Parametric Hypothesis Tests, Part 2:

Example, paired tests, confidence intervals

The total length of the videos in this section is approximately 48 minutes. You will also spend time answering short questions while completing this section.

You can also view all the videos in this section at the YouTube playlist linked here.

Please note: You have probably heard of t-tests and the surrounding concepts in an intro stats course. These videos are intended for learners who (like you) have already been exposed to these ideas at an introductory level. They move quickly. So: don't skip this!

You don't need to download and run the code and data I show in these videos. However, it is posted:

Mask example - graphics

ParamHypTestsP2.1.Mask Example - Visualization.mp4

Question 1: Briefly list the assumptions underlying a pooled t-test.

Show answer

independence (between and within), normal populations, equal population variances

Summary statistics

ParamHypTestsP2.2Mask example summary statistics.mp4

Question 2: What is the t-statistic for this example?

Show answer

Approximately 19. See expression in next video.

Calculating the t-statistic

ParamHypTestP2.3.- Mask Ex Calculating t-statistic.mp4

Question 3: What is the p-value? (You shouldn't need to look it up! You should know, based on the t-statistic!)

Show answer

0. If you calculate the pooled t-statistic, you obtain value that is slightly different from the unpooled t-statistic, but it still rounds to 19. See discussion in next video.

Relationship between t-statistics and p-values

ParamHypTestsP2.4.Relationship between t-statistics and p-values.mp4

Question 4: In an academic paper or professional report or news article, does the conclusion of a data analysis contain the phrase, "fail to reject the null hypothesis"?

Show answer

No. While it is important to have a precise understanding of how to interpret a p-value, and while it's important to explain a result in a non-misleading way, your conclusion should be focused on what you've learned in the context of the applied problem. For example, instead of "We failed to reject the null hypothesis," you might write something like, "we can't rule out the possibility that dinosaurs and princesses have the same mean number of offspring."

Confidence intervals

ParamHypTestsP2.5.Confidence Intervals.mp4

Question 5: If we obtain a two-sided p-value of 0.08 for the null hypothesis that the difference between two groups' means is zero, which is true of the corresponding 95% confidence interval?

Show answer

The interval includes zero. This question is about the way that confidence intervals relate to the p-values of the corresponding tests. If you get a p-value of less than .05 for the null hypothesis that the parameter is equal to zero, then the data is not consistent with  the parameter being equal to zero, so your 95% confidence interval will not include zero. If you get a p-value of more than .05 for the null hypothesis that the parameter is equal to zero, then that data is consistent with the parameter being equal to zero, so your 95% confidence interval will include zero. You can change "zero" to any other, and this still holds. You can also change your p-value cutoff from .05 to any value c, and this statement will be true for the corresponding confidence intervals with 1-c (rather than 1-.05 = .95) coverage.


Visualizing paired data

ParamHypTestP2.6.Visualizing paired data.mp4

Question 6: Why are the graphics drawn in the video inappropriate for paired data?

Show answer

These graphics ignore the paired structure. You have know way to know who is paired with whom. There is no point in collected paired data if you are not going to take advantage of the pairs when you explore and analyze the data.

Paired t-test

ParamHypTestP2.7.Paired t-test.mp4

Question 7: What do think is the other way to write code to conduct a paired t-test?

Show answer

Remember that a paired t-test is equivalent to a one-sample test on the differences. So, as shown in the next video, you could use:

diffs<-X-Y

t.test(diffs)

Code for all the t-tests in one place

ParamHypTestsP2.8.Code for all t-tests.mp4

Question 8: Fifty students fill out a survey that asks how much they spent on books each semester and how much they spend on clothes each semester. You want to know whether students spend different amounts of money on books than on clothes, on average. Which would be appropriate?

Show answer

A paired t-test would be appropriate here. Because we have both food and clothes expenditures from each student, we should study whether the difference between food and clothes expenditures is different from zero, on average. If we use a two-sample test, we are acting as if one set of students answered questions about food, and a different, unrelated set of students answered questions about clothes. But the whole point of gathering both pieces of information from the same set of students is that you don't want to end up asking a group of students with fewer overall resources about food and then asking a group of students with more overall resources about clothes, as that would not lead to a good estimate of the difference in average food v. clothes expenditures.

Good!

During this tutorial you learned:


Terms and concepts:

Assumptions, independence, unpooled t-statistic, pooled t-statistic, p-value, conclusion statement, confidence interval, paired data


Functions in review: 

hist(), boxplot(), log(), mean(), var(), t.test()