Chapter 9: Hypothesis Testing

Links to a carefully curated collection of Youtube videos provide a host of additional sourcs for you to develop your ability to use R software in an engaging and accessible manner.

Video 9.1: ‘What is a hypothesis test and a P-value?’

Question 1: What is the null hypothesis in the video?

Answer: That the mean length of fish is equal to 35 cm.

Question 2: What is the p-value tells you in this video?

Answer: The probability that we wind up with a sample mean length of fish of 41 cm or more if the mean length is expected to be 35 cm. We are told that it is .001 or 1%.

Question 3: Do we reject the null hypothesis in the video?

Answer: Yes, we reject the null that the mean length is 35 cm and conclude that the true mean length is greater than 35 cm.

 

Video 9.2: ‘Hypothesis testing 1: the big picture (one sample T test)’

Question: What is the key research question that is asked regarding whether or not the student’s IQ is 130?

Answer: The key question is how far below 130 does the average need to be before we think that his IQ is not really 130.

 

Video 9.3: ‘Hypothesis testing 2: null and alternative hypothesis (one sample T test)’

Question 1: What is the null hypothesis in the video?

Answer: The null hypothesis is that IQ =130.

Question 2: What is the alternative hypothesis in the video?

Answer: The alternative hypothesis is that IQ < 130.

 

Video 9.4: ‘Hypothesis testing 3: test statistic (one sample T test)’

Question 1: What is a test statistic?

Answer: Tells us how compatible a sample estimate is with our null hypothesis.

Question 2: How is the test statistic value used in the video calculated?

Answer: It is the (sample average – expected value)/standard error of the mean.

 

Video 9.5: ‘Hypothesis testing 4: critical values and rejection regions (one sample T test)’

Question 1: What is the most commonly used significance level?

Answer: 5%.

Question 2: What do we do when a value is below the critical value?

Answer: We reject the null hypothesis.

Question 3: What should we do to if we want to be less likely to falsely reject the null hypothesis?

Answer: We use a small significance level (such as 1%).

 

Video 9.6: ‘Hypothesis testing 5: P values (one sample T test)’

Question: What does the calculated p-value tell us in the video?

Answer: Assuming that the null is true, there is only a .0047 or .47% chance of observing an IQ score of 117 or less by chance.

 

Video 9.7: ‘Hypothesis testing 6: conclusion (one sample T test)’

Question: What is the final conclusion regarding the tested null hypothesis in the video?

Answer: The conclusion is that we reject the null that IQ = 130 and assume that the true IQ is <130.

 

Video 9.8: ‘One sample T test in R’

Question: How do we conduct a t-test in R?

Answer: We use the t.test() function.

 

Video 9.9: ‘Two sample T test in R: independent groups’

Question: How do we conduct a two-sample t-test with independent groups in R?

Answer: Using the t.test() function, we first specify the variable of interest and then the grouping variable (the variable that includes the two groups or samples). We also specify that the samples/groups are not paired.

 

Video 9.10: ‘Paired T test in R’

Question: How do we conduct a paired t-test in R?

Answer: Again, we use the t.test() function, but specify that the samples are paired.

 

Video 9.11: ‘Mann Whitney U aka Wilcoxon rank-sum test in R’

Question: How do we conduct a Wilcoxon rank-sum test in R?

Answer: We use the wilcox.test() function, where we first specify the variable of interest and then the grouping variable (the variable that includes the two groups or samples).

 

Video 9.12: ‘Wilcoxon signed rank test in R’

Question: How do we conduct a Wilcoxon signed rank test in R?

Answer: Again, we use the wilcox.test() function, but specify that the samples are paired.