>

## Simulation

To perform the simulation, we will (as always) assume the null hypothesis to be true, that there is no genuine association between these two variables. In other words, the pairing that exists in the data is arbitrary and we could just as easily mix up the density values that have been "assigned" to each number of Facebook friends. To model this, we will "shuffle" the 40 density values and place them at random with the x values.

• In the applet, uncheck Show Squared Residuals if that is still checked
• Check the box next to Show Shuffle Options.
• Use the Statistic pull-down menu to select the Slope.
• Select the Data radio button.
• Press the Shuffle Y-values button.

Notice that the x values haven't changed but the y values have been randomly mixed up and reassigned to those y values.

• Switch from the Data radio button to the Plot radio button.

This scatterplot shows these shuffled values and the new regression line for this rerandomized sample (in blue). (The original regression line is in red.)

(f) Did you obtain the same regression line as the researchers (in red)? Is the association still positive in the shuffled scatterplot? Is the relationship stronger or weaker than the one observed by these researchers (how are you deciding)?

(g) Press Shuffle Y-values again. Did you obtain the same (blue) regression line?

(h) Notice that the two sample slope values you generated have been added to the dotplot on the right (the most recent in blue). Suppose you repeat this shuffling 1000 times, where do you think this distribution will be centered? Why?

(i) Press the Shuffle Y-values button 8 more times (for a total of 10 shuffles).

• Describe the pattern you are seeing in how the regression lines on the shuffled scatterplot vary from shuffle to shuffle (what pattern is there to the grey lines on the scatterplot) as if to someone who couldn't see the same picture.
• Does the observed regression line for this study (in red) appear to be extreme (compare to the simulated blue lines)?