Question

In: Statistics and Probability

Solve with given information >xBar=955 #sample mean >mu0=1000 #hypothesized value >sigma=220 #population standard deviation, sqrt(102) >n=50...

Solve with given information

>xBar=955 #sample mean

>mu0=1000 #hypothesized value

>sigma=220 #population standard deviation, sqrt(102)

>n=50 #sample size >z= (xbar-mu0)/(sigma/sqrt(n))

>z #test statistic [1] 1.446 >alpha=.025

>zalpha=qnorm(1-alpha) >zalpha #critical value

[1] 1.96

>pval=pnorm(z)

>pval #lower tail p-value

[1] 0.148

1. Here we will consider how the p-value will change with the sample size, keeping all of the other information the same. Create a vector, called “n”, of different sample sizes, from 10 to 200 at an increment of 5. You can do this using the seq() command. Use this vector of sample sizes, along with the information in question 1 and the pnorm() function, to create a vector of p-values that is the same length as the vector n. Plot the vector of sample sizes on the horizontal axis and the vector of p-values on the vertical axis using the plot function. Label the axes.

a. Paste the figure below. What happens to the p-value as the sample size increases?

b. What range of sample sizes will give you a statistically significant result, holding the population standard deviation and sample average constant?

Solutions

Expert Solution

a)

> xbar=955 #sample mean
>
> mu0=1000 #hypothesized value
>
> sigma=220 #population standard deviation
>
> n<-seq(10,200,5) # n values from 10 to 200 by margin of 5
>
> pval=rep(0,length(n)) # define p value as same of length of "n"
>
> for(i in 1:length(n)){
+ z= (xbar-mu0)/(sigma/sqrt(n[i]))
+ pval[i]=pnorm(z)
+ }
>
> plot(n,pval,xlab="sample size",ylab="p-value",main = "P value as n increases")

b)

Comment :- as sample size increases the P value is decreases.i.e result become significant as sample size increases.

c) n >= 65 will give us the statistically significant result.

in R it can be done as

> g<-data.frame(n,pval)
> subset(g,pval<0.05)
n pval
12 65 0.049563762
13 70 0.043508256
14 75 0.038245808
15 80 0.033661609
16 85 0.029659883
17 90 0.026160171
18 95 0.023094476
19 100 0.020405033
20 105 0.018042550
21 110 0.015964801
22 115 0.014135485
23 120 0.012523302
24 125 0.011101189
25 130 0.009845691
26 135 0.008736431
27 140 0.007755678
28 145 0.006887969
29 150 0.006119801
30 155 0.005439364
31 160 0.004836313
32 165 0.004301577
33 170 0.003827193
34 175 0.003406162
35 180 0.003032326
36 185 0.002700262
37 190 0.002405192
38 195 0.002142902
39 200 0.001909671


Related Solutions

A population has a mean of 433 and a standard deviation of 102. If a sample...
A population has a mean of 433 and a standard deviation of 102. If a sample of size 10 is taken, what is the probability the sample mean is greater than 472.2? Enter your answer as a decimal to 3 decimal places A population has a mean of 218 and a standard deviation of 133. If a sample of size 8 is taken, what is the probability the sample mean is greater than 115.7 but less than 228.8? Enter your...
A random sample is selected from a population with mean μ = 102 and standard deviation...
A random sample is selected from a population with mean μ = 102 and standard deviation σ = 10. Determine the mean and standard deviation of the x sampling distribution for each of the following sample sizes. (Round the answers to three decimal places.) (a) n = 11 μ =   σ =   (b) n = 14 μ =   σ =   (c) n = 37 μ =   σ =   (d) n = 65 μ =   σ =   (f) n = 130...
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. From a random sample of 35 business​ days, the mean closing price of a certain stock was ​$109.47. Assume the population standard deviation is ​$10.14. please answer both questions, thank you
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. From a random sample of 32 business​ days, the mean closing price of a certain stock was ​$111.22. Assume the population standard deviation is ​$10.51. The​ 90% confidence interval is ​( nothing​, nothing​). ​(Round to two decimal places as​ needed.) The​ 95% confidence...
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Which interval is​ wider? If​ convenient, use technology to construct the confidence intervals. A random sample of 49 gas grills has a mean price of $631.60. Assume the population standard deviation is $55.70.
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Which interval is​ wider? If​ convenient, use technology to construct the confidence intervals. A random sample of 3232 gas grills has a mean price of ​$642.50642.50. Assume the population standard deviation is ​$59.1059.10. the 90% confidence interval is?? the 95% confidence interval is?? which interval is wider?
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. If​ convenient, use technology to construct the confidence intervals. A random sample of 55 home theater systems has a mean price of ​$136.00. Assume the population standard deviation is ​$18.60. a) The​ 90% confidence interval is ​____ b) The​ 95% confidence interval is...
You are given the sample mean of the population standard deviation use the information to construct...
You are given the sample mean of the population standard deviation use the information to construct a 90% and a 95% confidence interval for the population mean interpret the results and compare the widths Of the confidence intervals. from random sample of 42 business days The meme closing price of a certain stock was $122.81. assume the population standard deviation is $10.64 The 90% confidence interval is____? as well for 95%
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. From a random sample of 37 business​ days, the mean closing price of a certain stock was ​$118.77. Assume the population standard deviation is ​$11.26. The​ 90% confidence interval is
You are given the sample mean and the population standard deviation. Use this information to construct...
You are given the sample mean and the population standard deviation. Use this information to construct the​ 90% and​ 95% confidence intervals for the population mean. Which interval is​ wider? If​ convenient, use technology to construct the confidence intervals. A random sample of 43 gas grills has a mean price of ​$626.90. Assume the population standard deviation is ​$56.60. The​ 90% confidence interval is ​. ​(Round to one decimal place as​ needed.) The​ 95% confidence interval is ​. ​(Round to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT