Question

*Answer all questions using R-Script* Question 1 Using the built in CO2 data frame, which contains...

*Answer all questions using R-Script*

Question 1

Using the built in CO2 data frame, which contains data from an experiment on the cold tolerance of Echinochloa crus-galli; find the following.

a) Assign the uptake column in the dataframe to an object called "x"

b) Calculate the range of x

c) Calculate the 28th percentile of x

d) Calculate the sample median of x

e) Calculate the sample mean of x and assign it to an object called "xbar"

f) Calculate the interquartile range of x

g) Calculate the sample standard deviation of x and assign it to an object called "s"

h) Find the lower boundary for a 94 percent confidence interval for μ.

i) calculate the critical value for a 93 percent confidence interval for μ.

j) Find the upper boundary for a 94 percent confidence interval for μ.

k) how long is the 94 percent confidence interval for μ?

Question 2

Suppose A is a standard normal random variable and B is a normal random variable with mean 8 and standard deviation 11. Find the following:

a) Calculate the 29th percentile of the distribution of A

b) Calculate the 29th percentile of the distribution of B

c) What is the expected value of the random variable 7B-5

d) What is the standard deviation of the random variable 7B-5

e) What is the standard deviation of the random variable B*(-7/11)

Question 3

Let X 1, X 2, ... , X 12 come from a sample of the normal distribution. Suppose the sample mean is x and the sample standard deviation is s. With this information, we wish to test the null hypothesis H0:μ=35 against the alternative Ha:μ<35. Out test statistic will be (x-35)/(s*sqrt(12)). Our sample yields x = 33.15 and s = 1.96. Answer the following:

a) If xbar = 33.15 and s = 1.96 then what is the value of T?

b) How many degrees of freedom does this distribution have if T has a t distribution

c) If we test at the 2% level, then what is the critical value?

d) What is the p-value based upon our sample?

e) Do we reject the null hypothesis? (yes or no)

f) If we repeat a 2 % level test 400 times, about how many times do we expect to commit a type I error?

Question 4

Say we have two independent normal populations X and Y with known standard deviations σx = 5.1 and σy = 5.3 . We then take a random sample of size 7 from X (X1, X2, … X7) and a random sample from y of size 5 as follows

X: 10.75, 12.05, 2.25, 1.26, -1.43, 1.69, 15.28
Y: 6.95, 8.22, 7.95, 5.85, -2.44

Calculate the following using R:

a) Calculate xbar

b) calculate the variance of xbar

c) calculate ybar

d) calculate the variance of ybar

e) calculate the variance of xbar-ybar

f) What is the critical value used for a 95% confidence interval for μx - μy?

g) create a 95 % confidence interval for μx - μy.

h) what is the length of the 95% confidence interval for μx - μy?

i) What would the p value have been if we used this data to test H0x - μy=0 against the alternative Hax - μy > 0?

Question 5

We desire to know the probability that a voter supports a controversial rose proposal. From a random sample of 3100, x =1331 voters support the rose proposal. Let phat be the sample proportion supporting the rose proposal. Answer the following:

a) what is the variance of p hat

b) As a function of p, what is the standard deviation of p hat

c) Calculate p hat

d) Let ptot be the random variable representing the voters in the sample who support the rose proposal. As a function of p, what is the standard deviation of ptot?

e) Calculate a classical 96% confidence interval for p

f) What is the critical value for an approximate classical 94 percent confidence interval for p?

g) What is the length of the 96% confidence interval for p?

h) Assuming the same phat value, what sample size would have made the 96% confidence interval for p to have a length of .08 or less?

Homework Answers

Answer #1

Question 1

All R scripts are shown in bold

a) Assign the uptake column in the dataframe to an object called "x"

x = CO2$uptake

b) Calculate the range of x

range(x)
[1] 7.7 45.5

c) Calculate the 28th percentile of x

quantile(x, 0.28)
28%
18.292

d) Calculate the sample median of x

median(x)
[1] 28.3

e) Calculate the sample mean of x and assign it to an object called "xbar"

xbar = mean(x)

f) Calculate the interquartile range of x

IQR(x)
[1] 19.225

g) Calculate the sample standard deviation of x and assign it to an object called "s"

s = sd(x)

h) Find the lower boundary for a 94 percent confidence interval for μ.

For 94 percent confidence interval, = 1 - 0.94 = 0.06

Thus, the boundary intervals are 0.06/2 and 1 - 0.06/2 = 0.03 and 0.97

Lower limit = Mean - z * standard error

where Standard error = s / sqrt(n) where n is sample size

and z is z value for 94 percent confidence interval.

So, the R script is,

xbar - (qnorm(0.97) * s / sqrt(length(x)))
[1] 24.99385

i) calculate the critical value for a 93 percent confidence interval for μ.

For 93 percent confidence interval, = 1 - 0.93 = 0.07

Thus, the boundary intervals are 0.07/2 and 1 - 0.07/2 = 0.035 and 0.965

The crirtical value of z for 93 percent confidence interval is

qnorm(0.965)

[1] 1.811911

Lower and upper limit of the confidence interval are

xbar - (qnorm(0.965) * s / sqrt(length(x)))
[1] 25.07513
xbar + (qnorm(0.965) * s / sqrt(length(x)))
[1] 29.35106

j) Find the upper boundary for a 94 percent confidence interval for μ.

xbar + (qnorm(0.97) * s / sqrt(length(x)))

[1] 29.43234

k) how long is the 94 percent confidence interval for μ?

Calculate the lower and upper limit and then calculate their difference for length of the confidence interval.

ll = xbar - (qnorm(0.97) * s / sqrt(length(x)))
ul = xbar + (qnorm(0.97) * s / sqrt(length(x)))

ul - ll
[1] 4.438482

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using R-Studio We desire to know the probability that a voter supports a controversial rose proposal....
Using R-Studio We desire to know the probability that a voter supports a controversial rose proposal. From a random sample of 3100, x=1331 voters support the rose proposal. Let p hat be the sample proportion supporting the rose proposal. Answer the following: a) what is the variance of p hat b) As a function of p, what is the standard deviation of p hat c) Calculate p hat d) Let ptot be the random variable representing the voters in the...
The built-in R dataset swiss gives Standardized fertility measure and socio-economic indicators for each of 47...
The built-in R dataset swiss gives Standardized fertility measure and socio-economic indicators for each of 47 French-speaking provinces of Switzerland at about 1888. The dataset is a data frame containing 6 columns (variables). The column Infant.Mortality represents the average number of live births who live less than 1 year over a 3-year period. We are interested in the Infant.Mortality column. We can convert the data in this colun to an ordinary vector x by making the assignment x <- swiss$Infant.Mortality....
This is meant for R. AirPassengers is a time series giving the monthly totals (in thousands)...
This is meant for R. AirPassengers is a time series giving the monthly totals (in thousands) of international airline passengers, 1949 to 1960. We may convert the time series to a vector,x, with the assignment x <- as.vector(AirPassengers). Let the random variable X represent a random observation from the values in AirPassengers. Assume X has mean mu and standard deviation sigma and that there is no trend in the data and values are independent from one another. Think of x...
The built-in ldeaths data set contains measurements giving the monthly deaths from bronchitis, emphysema and asthma...
The built-in ldeaths data set contains measurements giving the monthly deaths from bronchitis, emphysema and asthma in the UK, 19741979, both sexes. We can easily access this data with the assignment x <- as.vector(ldeaths). We can also get the data by entering the values 1 by 1. (You would be wise to not do the 1 by 1 entry.) The following is a screen print of the data values:s: [1] 3035 2552 2704 2554 2014 1655 1721 1524 1596 2074...
The built-in R dataset swiss gives Standardized fertility measure and socio-economic indicators for each of 47...
The built-in R dataset swiss gives Standardized fertility measure and socio-economic indicators for each of 47 French-speaking provinces of Switzerland at about 1888. The dataset is a data frame containing 6 columns (variables). The column Infant.Mortality represents the average number of live births who live less than 1 year over a 3-year period. We are interested in the Infant.Mortality column. We can convert the data in this colun to an ordinary vector x by making the assignment x <- swiss$Infant.Mortality....
Scooter's Tavern boasts that they have the "Coldest Beers in Town". A curious citizen tested a...
Scooter's Tavern boasts that they have the "Coldest Beers in Town". A curious citizen tested a random sample of 47 beers and found a mean temperature of 35, with a standard deviation of 0.4. We are going to construct a 94% confidence interval for the mean temperature of all beers in the tavern.  Round all answers to 3 decimal places What is the point estimate for our confidence interval?   For the critical value, should we use the z-statistic or the t-statistic?...
The built-in ldeaths data set contains measurements giving the monthly deaths from bronchitis, emphysema and asthma...
The built-in ldeaths data set contains measurements giving the monthly deaths from bronchitis, emphysema and asthma in the UK, 19741979, both sexes. We can easily access this data with the assignment x <- as.vector(ldeaths). We can also get the data by entering the values 1 by 1. (You would be wise to not do the 1 by 1 entry.) The following is a screen print of the data values:s: [1] 3035 2552 2704 2554 2014 1655 1721 1524 1596 2074...
The built-in ldeaths data set contains measurements giving the monthly deaths from bronchitis, emphysema and asthma...
The built-in ldeaths data set contains measurements giving the monthly deaths from bronchitis, emphysema and asthma in the UK, 19741979, both sexes. We can easily access this data with the assignment x <- as.vector(ldeaths). We can also get the data by entering the values 1 by 1. (You would be wise to not do the 1 by 1 entry.) The following is a screen print of the data values:s: [1] 3035 2552 2704 2554 2014 1655 1721 1524 1596 2074...
****PLEASE ANSWER ALL QUESTIONS**** Question 7 (1 point) The owner of a local golf course wants...
****PLEASE ANSWER ALL QUESTIONS**** Question 7 (1 point) The owner of a local golf course wants to determine the average age of the golfers that play on the course in relation to the average age in the area. According to the most recent census, the town has an average age of 38.58. In a random sample of 20 golfers that visited his course, the sample mean was 36.61 and the standard deviation was 7.505. Using this information, the owner calculated...
We will illustrate Chebyshev’s theorem using the binomial distribution. Suppose you are modeling successes on “cold...
We will illustrate Chebyshev’s theorem using the binomial distribution. Suppose you are modeling successes on “cold call sales” and that the probability of your success on such a call is 0.25 (you are very persuasive!) You will make 20 such calls. Define X≡number of successes on 20 calls (you may assume independence). What is the mean and the standard deviation of this random variable? What is the interval μ-2 σ≤X≤μ+2 σ ? c) Calculate P μ-2 σ≤X≤μ+2 σ