200 likes | 210 Views
This resource provides exercises and solutions for hypothesis testing in various scenarios, including normal probabilities, journey time variations, Z-scores, hypotheses, statistical significance, and probability calculations.
E N D
Introduction to Hypothesis Testing: Exercises and solutionsDr Jenny FreemanMathematics & Statistics HelpUniversity of Sheffield
Exercise 1: Normal probabilities X = Birthweight; Mean = 3.4kg, SD = 0.57kg What’s the probability of a baby weighing: • More than 4.5kg • More than 2.3kg
Exercise 1: Normal probabilities X = Birthweight; Mean = 3.4kg, SD = 0.57kg What’s the probability of a baby weighing: • Less than or equal to 2.3kg • Between 2.3kg & 4.5kg
Exercise 2 By how much can I expect my journey time to vary for direction A? (mean = 32.8 minutes and SD = 4.6 minutes) Limits are calculated as: • First calculate 1.96 SD’s: x = • Lower limit: – = • Upper limit: + = 95% of journey times are between and minutes
Exercise 3: calculating Z scores A baby is born weighing 4.5 kg. Given the mean weight is 3.4 and SD is 0.57, calculate the Z score for this baby x = Individual score of interest • Is this within the 95% normal range? • Use the normal distribution one-sided probability table to calculate the probability of getting a Z score above 1.93
Exercise 4: Hypotheses What would the null and alternative hypotheses be for these research questions? • Did class affect survival on board the Titanic? • Do students who attend MASH workshops do better in their statistics module than those who do not?
Exercise 5: Statistical significance • The significance level is usually set at 5%, this is conventional rather than fixed – for stronger proof could use a level of 1% (0.01) • The smaller the p-value, the more confident we are with our decision to reject • The p-value for the test of a difference in module marks between students who do and do not attend a MASH workshop was 0.02. What would you conclude and how confident are you with your decision?
Exercise 6: The magic 0.05 • What’s the probability of getting a head? • What’s the probability of getting 2 heads in a row? • If we toss the coin 4 times, what is the probability of getting 4 heads?
Exercise 7: Testing your own die You all have fair die – or do you???
Exercise 7: Testing your own die • Null: • Alternative: • Test Statistic: • P-value • Conclusion:
Exercise 1: Solution X = Birthweight; Mean = 3.4kg, SD = 0.57kg What’s the probability of a baby weighing: • More than 4.5kg P(X > 4.5)=0.0268 • More than 2.3kg P(X > 2.3)=0.9732
Exercise 1: Solution X = Birthweight; Mean = 3.4kg, SD = 0.57kg What’s the probability of a baby weighing: • Less than or equal to 2.3kg P(X ≤ 2.3) = 1- P(X > 2.3) = 1- 0.9732 = 0.0268 • Between 2.3kg & 4.5kg P(2.3 < X < 4.5) = P(X > 2.3)-P(X > 4.5) = 0.9732 - 0.0.0268 = 0.9464
Exercise 2: Solution By how much can I expect my journey time to vary for direction A? (mean = 32.8 minutes and SD = 4.6 minutes) Limits are calculated as: • First calculate 1.96 SD’s: 1.96 x 4.6 = 9.02 • Lower limit: 32.8 – 9.02 = 23.78 • Upper limit: 32.8 + 9.02 = 41.82 95% of my journeys are between 24 and 42 minutes
Exercise 3: Solution A baby is born weighing 4.5 kg. Given the mean weight is 3.4 and SD is 0.57, calculate the Z score for this baby x = Individual score of interest • Is this within the 95% normal range? Yes as -1.96 < z < 1.96 • Use the normal distribution one-sided probability table to calculate the probability of getting a Z score above 1.93 0.027 so 2.7% chance that the baby weighs more than 4.5kg
Exercise 4: Solution • Did class affect survival on board the Titanic? Null:There is no relationship between class and survival Alternative: There is a relationship between class and survival • Do students who attend MASH workshops do better in their statistics module than those who do not? Null: The mean module mark for students who attend MASH workshops is the same as for students who do not attend MASH workshops Alternative: The mean module mark for students who attend MASH workshops is the higher than for students who do not attend MASH workshop
Exercise 5: Solution • The significance level is usually set at 5%, this is conventional rather than fixed – for stronger proof could use a level of 1% (0.01) • The smaller the p-value, the more confident we are with our decision to reject • The p-value for the test of a difference in module marks between students who do and do not attend a MASH workshop was 0.02. We would conclude that there is evidence to reject the null hypothesis and accept the alternative that students who attend a MASH workshop do better in their stats module than students who do not attend a workshop
Exercise 6: Solution • What’s the probability of getting a head? • What’s the probability of getting 2 heads in a row? • If we toss the coin 4 times, what is the probability of getting 4 heads? (pretty close to the magic 0.05, 5%)
Using tables for probabilities • Probabilities tabulated for distribution with mean = 3.4, SD = 0.57
Table: Normal curve tail probabilities (one tailed). Standard normal probability in right-hand tail