Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.
    1. Paste the figure below. What happens to the p-value as the sample size increases?
    2. What range of sample sizes will give you a statistically significant result, holding the population standard deviation and sample average constant?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Language in Context?

Answered: 1 week ago