Question: Step 2. Generate the sampling distribution of the sample mean under the null hypothesis: The sample mean weight of the sundaes is Generate 1000 samples

 Step 2. Generate the sampling distribution of the sample mean under

the null hypothesis: The sample mean weight of the sundaes is Generate1000 samples of size 30 from the data set sundae and find

Step 2. Generate the sampling distribution of the sample mean under the null hypothesis: The sample mean weight of the sundaes is Generate 1000 samples of size 30 from the data set sundae and find the mean of each. in RStudio, enter the data and call the data set "sundae," then type > sundaemeans=colMeans(replicate(1000, sample(sundae,30,replace=TRUE))) Find the mean of sundaemeans and the difference between it and the null hypothesis value: difference = 6.3 - mean(sundaemeans) = Generate the sampling distribution of sample means assuming the null hypothesis is true by adding the difference above to each mean in sundaemeans. In RStudio, type > nulldist] = sundaemeans + difference, where difference is from the previous step. Make a histogram of nulldistl. Sketch it below; this is the sampling distribution of the sample mean under the null hypothesis. On the x-axis, mark the population mean 6.3 and the sample mean (the mean of the original sample). Step 3. Calculate the p-value of the test by calculating the probability of observing a sample mean as low as the sample mean of the original dataset, or lower. On the picture above, shade the area corresponding to the p-value. In RStudio, type > length(sundaemeans [ sundaemeans

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!