Tuesday, October 6, 2015

Notes for October 6 and 8.


The posts about the confidence intervals for proportions.

The explanation of Fisher's idea, the hypothesis test.

The differences between p, p-hat and p-value.

 Let's consider the lady tasting tea and how we would test her using a z-score. This is a reasonably simply calculation, though it isn't as precise when n is small as using the numbers we get from looking at the problem as sampling with replacement.

In this case, the null hypothesis is given by the equation

H0: p = 0.5

What this states is that she is "just guessing" between milk-in-tea and tea-in-milk, so she should have a 50-50 chance to be right (or wrong) each time.

Let's say we set our confidence level at 99% and tested her six times, and she went six for six. That means p-hat = 6/6 = 1.  We now have all the numbers we need to get our z-score. using sqrt to stand in for square root, in our calculator we would type

(1 - .5)/sqrt(.5*.5/6) = 2.4494897...,

which is 2.45 when rounded to the nearest hundredth. We use this to look up the p-value on the goldenrod sheet and get .9929. This is the p-value, the test statistic we use to make out decision whether or not to reject H0 or fail to reject. Because this is a high tailed test and .9929 >= .99, we reject the null hypothesis, which means we think she is not just guessing given the results of this test.

Translated into English, we are 99% convinced she actually has some talent at telling the difference between the two ways of making tea, but we still hold out the 1% possibility that she was just a very lucky guesser.

As for the three numbers that all use the letter p, once again:

p is the probability we get by the definition of the test. In this case it was 0.5, but we will do other tests where the number can be something else.

p-hat is the proportion of answers she got right if we do the high tailed test, or the proportion of answers she got wrong if we use the more accurate low tailed test.

The p-value is the proportion we get from the test statistic, and this is what we use to decided whether we will reject or fail to reject the null hypothesis H0




No comments: