A visulalization of the 1 sample t-test

Question

Would you please provide a visual explanation of what the 1 sample t-test, ttest_1samp(exampleDistribution, expectedMean), is doing with its arguments?

Answer

Relating the behavior of our 1 sample t-test back to this applet, think of ttest_1samp as first taking the list of values, exampleDistribution, and turning that into a distribution. Once we have that distribution, we can compute a mean. You can think of this as one of the two distributions in the applet. Next, form a perfect normal distribution with mean expectedMean and a fixed standard deviation equal to that of the first distribution; this is your second distribution in the applet. The 1 sample t-test is then computing the exact p-value, or something similar, that we see at the bottom of the applet.

2 Likes