I am writing a scheme function that pairs an element to every element in a list, and I have the following code so far:
(define (pair-element e l)
(cond ((null? l) (list e))
(else (cons e (car l)) (pair-element (cdr l)))))
(pair-element 4 `(4 3 5))
What is my error? I'm getting a pair element mismatch when I run it. I need to do this without using built-in functions. Thanks!
In: Computer Science
In: Computer Science
What did Smith mean by the Division of Labor and why did he see it as crucial to explaining the Wealth of Nations? What is the cause of the Division of Labor, for Smith? How does the division of labor increase productivity, in his view? What is the effect on workers? Explain how Smith's work on the division of labor challenges the standard neo-classical account of the economy built on the assumption of constant returns, and how it supports a different argument for free trade than we get from Ricardo's theory of comparative advantage
In: Economics
this code should be in R.
Write function(s) to drop the smallest one exm grade out of several Exm grades. If a student misses an exm, the grade is NA. You must use NA instead of 0 to represent the value for exms missing. (a) Develop a function to convert an array to another array in which all NA grades are replaced with zero. (b) Complete your function to compute the mean of all elements row by row after dropping exactly one lowest grade. You cannot use any loop statement inside or outside your functions for both (a) and (b). You may use the built-in function in R to find the minimum value in an array. You may use ifelse() only once. You may use the built-in function mean() to find the mean. But be careful! For testing purpose, you may use the following exm grades for each student in each row:
Exm 1 Exm 2 Exm 3 Exm 4
80 NA 90 NA
60 80 100 NA
90 80 100 40
The average grade of each student must be displayed as a row in a matrix. For the exmple above, you need to display a 3 x 1 matrix with three rows of mean values in one column.
You may use functions: is.na() or na.omit().
In: Computer Science
Voltage sags and swells. The power quality of a transformer
is measured by the quality of the voltage. Two
causes of poor power quality are “sags” and “swells.” A
sag is an unusual dip and a swell is an unusual increase in
the voltage level of a transformer. The power quality of
transformers built in Turkey was investigated in Electrical
Engineering (Vol. 95, 2013). For a sample of 103 transformers
built for heavy industry, the mean number of sags per
week was 353 and the mean number of swells per week
was 184. Assume the standard deviation of the sag distribution
is 30 sags per week and the standard deviation of the
swell distribution is 25 swells per week.
a. For a sag distribution with any shape, what proportion
of transformers will have between 263 and 443 sags per
week? Which rule did you apply and why?
b. For a sag distribution that is mound-shaped and symmetric,
what proportion of transformers will have between
263 and 443 sags per week? Which rule did you
apply and why?
c. For a swell distribution with any shape, what proportion
of transformers will have between 109 and 259 swells
per week? Which rule did you apply and why?
d. For a swell distribution that is mound-shaped and symmetric,
what proportion of transformers will have between
109 and 259 swells per week? Which rule did you
apply and why?
In: Statistics and Probability
Here is another infectious disease model. Once a person becomes infected, the time X, in days, until the person becomes infectious (can pass on the disease) can be modeled as a Weibull random variable with density function f(x,α,β) = α βα xα−1e−(x/β)α for 0 ≤ x ≤ ∞ and 0 otherwise with α = 3.7 and β = 7.1 α is the shape parameter and β is the scale parameter. Hint: Solve this with the built-in R functions for the Weibull distribution (dweibull(),pweibull(), qweibull()) not f as defined above. Otherwise you may get intermediate values too large to use. For a) and b) the text (and notes) give formulas for the answers. You can calculate from these formulas. Note that these formulas use the gamma function. Γ(α) is the gamma function. In R, there is a built-in function gamma() which calculates this.
a) What is the expected value of X? 6.4074
b) What is the variance of X? 3.719794
c) What is the standard deviation of X? 1.928677
d) What is the probability that X is larger than its expected value? 0.5045822
e) What is the probability that X is > 2? 0.9908345
f) What is the probability that X is > 4? 0.8872 g) What is the probability that X > 4 given that X > 2?
can you please solve that using R code . please
0.8954249 h) Calculate the 70th percentile of X. 459.273
In: Statistics and Probability
1. Let W1, . . . , Wn be i.i.d. N(µ, σ2). A 100(1 − α)% confidence interval for σ2 is
( ([n − 1]*S2 ) / (χ21−α/2,n−1 ) , ([n − 1]S2) / ( χ2α/2,n−1) ,
where χ2u,k denotes the 100×uth percentile of the χ2 distribution with k degrees of freedom, S2 = (n − 1)−1 * the sum of (Wi − Wbar )2 (from 1 to n) is the sample variance and Wbar = n−1 * the sum of Wi (from i = 1 to n) the sample mean.
(a) Suppose µ = 68, σ = 4, n = 12, and α = 0.05. Estimate the coverage probability of this random confidence interval for σ2 using a Monte Carlo simulation with 1e4 replications. That is, estimate the probability that the confidence interval captures σ2 . Denote this estimated probability by pbar. Comment on how 1 − α compares to ±1/ √ 1e4. You may use the qchisq function (hint: the χ2 distribution is not symmetric) but you may not use the built in rnorm function.
(b) Estimate the coverage probability for the confidence interval when W1, . . . , Wn are i.i.d. Exp(1). Notice that in this case σ2 = var(W1) = 1. Estimate the coverage probability pbar for each (n, α) ∈ {10, 50, 100} × {0.05, 0.1}. In each case, compare 1 − α to pbar ± 1/ √ 1e4. Again, you may not use the built in rexp function. Comment on the results.
In: Statistics and Probability
USING UNITED STATES IBC CHAPTER 7:
1. Roofing inter-layment shall have a minimum width of ____ inches.
A. 12 B. 18 C. 34 D. 36
2. What is the minimum roof covering classification for a roof assembly on a building of Type IA construction?
A. Class A B. Class B C. Class C D. Non-classified
3. Roof assemblies consisting of metal sheets of shingle are considered ____ as roof assemblies.
A. A B. B C. C D. Special purpose
4. Double underlayment application is required beneath asphalt shingles on roofs having a maximum slope of ______.
A. 2:12 B. 3:12 C. 4:12 D. 5:12
5. In areas subject to high winds, underlayment beneath asphalt shingles shall be fastened along the overlap at a maximum spacing of ____ inches.
A. 12 B. 18 C. 24 D. 36
6. Define the following terms as per code:
a. Built-up roof covering:
b. Positive roof drainage:
c. Scupper:
d. Roof recover
7. List the test(s) that are used to measure the wind resistance of asphalt shingles.
8. Describe a product that meets the material requirements for wood shingles in roof
9. For built-up roofs, what test standard is used for the use of asphalt in roof?
10. Describe the code requirement in an area where there is a history of ice-forming along the eaves.
In: Civil Engineering
subject: International business
|
Q. No. 3 |
Analyze the following situation and answer the questions given below |
Max Marks 10 |
Should We Allow Global Corporation to Set Up a Factory in our Country?
About the business. Global Corporation is applying for planning permission to build a factory in your country. The factory is expected to be very profitable. 1000 new jobs should be created for assembly-line work. Many of the goods made could be sold abroad. Some of the supplies for the factory will come from your country.
About your country. In your country unemployment is high, especially amongst skilled workers. The government cannot afford any new building projects. There are several local competitors producing goods similar to the Global Corporation. Import levels are very high. Land for new building is very limited. New developments would have to be built in beautiful countryside.
Questions
i. List three groups in your country who may benefit from allowing the Global Corporation to build the factory.(1.5)
ii. List three groups in your country who may lose from the building of the factory.(1.5)
iii. Would you advise your government to allow the new factory to be built? Explain your answer by judging between or evaluating all of the evidence.(3)
In: Economics
subject: Digital marketing
Eagle EV is a manufacturer of electric and gas-powered golf carts and UTVs for personal and commercial use that has been around for more than 40 years. It is extremely well-known in the golf industry as a leading provider in well-built, functional vehicles to help golfers and staff get around the course in luxury, style, and class. If you’ve ever golfed at a challenging course with undulating and varying terrain, then you know how nice it is to be in a cart built for the conditions.
There’s no doubt that Eagle EV is the industry’s number one choice for outdoor adventure, however, the company was not utilizing its website and digital marketing efforts to its full potential. So that’s when Cardinal stepped in.
After meeting with the team at Eagle EV, the Digital Marketing team at your agency did an extensive evaluation of their marketing efforts and put a tracking system in place to effectively pinpoint areas of opportunity. Eagle EV knew that customers are always searching for the golf carts either by using brand name or general terms. Our goal was to analyze and funnel Eagle EV marketing dollars into the right places to be able to attract a higher return on investment.
Q.4 Recommend, how can you help Eagle EV target people who are searching for these products & what tools can be used to identify the search behavior of their customers.
|
|
|
|
In: Economics