Docsity

Statistical Tests: Z-Test for Counts and Percentages, T-Test, and Two-Sample Z-Test, Study notes of Statistics

Partial preview of the text

Download Statistical Tests: Z-Test for Counts and Percentages, T-Test, and Two-Sample Z-Test and more Study notes Statistics in PDF only on Docsity!

STAT 2

Lecture 31:

Statistical tests,

continued

Today ● Statistical significance ● The z -test for counts and percentages ● The t -test ● The two-sample z -test

Recall: hypotheses I think that Berkeley students study, on average, 20 hours a week. My friend thinks the true average is much less than this. ● Null hypothesis: average hours studied per week = 20 ● Alternative hypothesis: average hours studied per week < 20

One-sided and two-sided tests My friend is willing to let me win even if the average number of hours studied is much more than

● We perform a one-sided , or one- tailed , test: we will only reject the null if the average is low, not high

The data ● My sample has a mean of 19 hours and an SD+* of 9 hours ● Estimated SE of sample average = 9/sqrt(200) = 0. ● z -statistic = (19 – 20)/0. = -1. *it's slightly better to use the SD+ when using the sample SD to stand in for the population SD

Recall: P -value ● From tables, P(Z < -1.57) = 5.82% We don't need P(Z > 1.57) because it's a one-tailed test, so the P -value is 5.82% ● If we reject strictly if the P -value is less than 5%, we can't reject here: the difference isn't significant at the 5% level

How do we interpret this? ● I would reply that even if there were a difference, it would be small: it may or may not be statistically significant, but it isn't practically significant ● The tests we've seen don't test for a practically significant difference (which is usually subjective)

II

The z -test for counts and percentages

Example: The UC Davis ESP test ● Test statistic: z -statistic based on number of correct guesses (we could use the binomial, but the normal approximation is very good and it saves us having to add thousands of probabilities) ● Null hypothesis: each guess is like a draw from the box [ 1 0 0 0 ]; that is, each guess has a 1 in 4 chance of being correct, and the event that a guess is right is independent of all other guesses ● Hard to define an alternative: maybe “the expected percentage of correct guesses is more than 25%” (hardcore frequentists would not approve of this)

Example: The UC Davis ESP test What would we expect under the null hypothesis? ● Expect 25% of guesses to be correct, or 7500/4 = 1875 ● SE of number of correct guesses is sqrt(7500) * sqrt(0.25*0.75) = 37 ● Number of correct guesses has an approximately normal distribution

Example: The UC Davis ESP test The number of correct guesses is not consistent with the null hypothesis. Does this mean the subjects have ESP? ● Maybe, or maybe the machine was malfunctioning

Summary ● With a large sample, we can use the z -test to test a hypothesis about a count or a percentage, since the Central Limit Theorem will hold ● Exception: for very rare (e.g. the percentage of people who are one of a set of triplets) or almost certain events, such tests may be misleading

The t -test ● The z -test doesn't work well for moderate-sized samples ● W.S. Gosset (aka “Student”) invented the t -test for use in some such situations

Example ● I know the true density of silver is 10490 kg/m 3 ● I have a silver-looking bar; I'm not sure if it's pure silver, so I want to find out if the bar's density is really 10490 kg/m 3 ● I measure its the density ten times