Hypothesis Testing for Properties - Statistical Methods | STAT 303, Study notes of Data Analysis & Statistical Methods

Material Type: Notes; Class: STATISTICAL METHODS; Subject: STATISTICS; University: Texas A&M University; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-dn0
koofers-user-dn0 🇺🇸

3

(1)

9 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Hypothesis Testing for Proportions
An example of a one-sample test for proportions:
We could run a test of hypothesis to see if our data for Red M&M’s actually agrees with the advertised amount.s actually agrees with the advertised amount.
In our experiment, we had an average of 10.7 or 19% Red.
Variable | Obs Mean Std. Dev. Min Max
---------+-----------------------------------------------------
Red | 83 10.73494 3.679489 3 22
pRed | 83 .1916867 .0651044 .05 .38
Total | 83 56.06024 2.96051 44 63
Using the Steps in Hypothesis Testing:
1. State H0 (it ALWAYS has the = ) and HA (it’s actually agrees with the advertised amount.s sign depends on the question asked).
The null hypothesis is the ‘status quo’s actually agrees with the advertised amount., so here it would be M&M’s actually agrees with the advertised amount.s advertised percent. According to their web
site, this is 20%. Since we just want to check this, we can test:
H0: Red = 0.20 vs. HA: Red 0.20
2. Determine the appropriate -level (depending on the consequence of Type I and II errors).
We’s actually agrees with the advertised amount.ll discuss Type I and II errors later. For now, let’s actually agrees with the advertised amount.s use the usual 5%. This means if our observed proportion
would happen less than 5% of the time if the true proportion is 20%, then we’s actually agrees with the advertised amount.re going to claim the advertised
amount is NOT 20%.
3. Determine the appropriate test and calculate a p-value (use Labs=>Calculating Tests of Hypotheses and the
flowchart to determine which Case).
So far we’s actually agrees with the advertised amount.ve only talked about z-tests (we converted the sample proportion, p, to a z-score and then found the
probability using the Z Table). There are many other types of tests that we will discuss soon.
For this particular type of data, we will be using Case 6, the normal approximation for proportions.
NOTE: You must verify if the Conditions for the normal approximation hold before running this test, however. We
did this on HW#4.5.
Case 6 says we need to give n and p. So, we put 0.05 in the box labelled alpha, 56 in the n box, 0.19 in the p box,
0.20 in the hyp value (hypothesized value, the number in H0) box, and finally click on Two-sided in the Test box.
You just ignore the rest of the boxes
because it isn’s actually agrees with the advertised amount.t used. The output and graph
are:
Two-Sided Test for 0-1 proportion pi
(approximate):
alpha = .05
Hypothesized value = .2
n = 56, p = .19
Z_calc = -.18708287
Critical values: -1.959964 , 1.959964
Fail to reject H_0
p-value = .85159566
4. State the conclusion (if p-value ,
reject H0; otherwise, fail to reject) in terms of the hypothesis (answer the question asked).
The p-value is given in the output (see the last line) and in the last line of the title of the graph.
Since the p-value = 0.852 which is NOT < = 0.05, we cannot reject our null hypothesis. In other words, our data
is quite consistent with the advertised percent of Red M&M’s actually agrees with the advertised amount.s. We cannot refute their claim.
Another example of a one-sample test for proportions:
pf3
pf4
pf5
pf8

Partial preview of the text

Download Hypothesis Testing for Properties - Statistical Methods | STAT 303 and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

Hypothesis Testing for Proportions An example of a one-sample test for proportions: We could run a test of hypothesis to see if our data for Red M&M’s actually agrees with the advertised amount.s actually agrees with the advertised amount. In our experiment, we had an average of 10.7 or 19% Red. Variable | Obs Mean Std. Dev. Min Max ---------+----------------------------------------------------- Red | 83 10.73494 3.679489 3 22 pRed | 83 .1916867 .0651044 .05. Total | 83 56.06024 2.96051 44 63 Using the Steps in Hypothesis Testing:

  1. State H 0 (it ALWAYS has the = ) and HA (it’s actually agrees with the advertised amount.s sign depends on the question asked). The null hypothesis is the ‘status quo’s actually agrees with the advertised amount., so here it would be M&M’s actually agrees with the advertised amount.s advertised percent. According to their web site, this is 20%. Since we just want to check this, we can test: H 0 : Red = 0.20 vs. HA: Red  0.
  2. Determine the appropriate -level (depending on the consequence of Type I and II errors). We’s actually agrees with the advertised amount.ll discuss Type I and II errors later. For now, let’s actually agrees with the advertised amount.s use the usual 5%. This means if our observed proportion would happen less than 5% of the time if the true proportion is 20%, then we’s actually agrees with the advertised amount.re going to claim the advertised amount is NOT 20%.
  3. Determine the appropriate test and calculate a p -value (use Labs=>Calculating Tests of Hypotheses and the flowchart to determine which Case ). So far we’s actually agrees with the advertised amount.ve only talked about z -tests (we converted the sample proportion, p , to a z -score and then found the probability using the Z Table). There are many other types of tests that we will discuss soon. For this particular type of data, we will be using Case 6, the normal approximation for proportions. NOTE: You must verify if the Conditions for the normal approximation hold before running this test, however. We did this on HW#4.5. Case 6 says we need to give n and p. So, we put 0.05 in the box labelled alpha , 56 in the n box, 0.19 in the p box, 0.20 in the hyp value (hypothesized value, the number in H 0 ) box, and finally click on Two-sided in the Test box. You just ignore the rest of the boxes because it isn’s actually agrees with the advertised amount.t used. The output and graph are: Two-Sided Test for 0-1 proportion pi (approximate): alpha =. Hypothesized value =. n = 56, p =. Z_calc = -. Critical values: -1.959964 , 1. Fail to reject H_ p-value =.
  4. State the conclusion (if p -value  , reject H 0 ; otherwise, fail to reject) in terms of the hypothesis (answer the question asked). The p-value is given in the output (see the last line) and in the last line of the title of the graph. Since the p-value = 0.852 which is NOT <  = 0.05, we cannot reject our null hypothesis. In other words, our data is quite consistent with the advertised percent of Red M&M’s actually agrees with the advertised amount.s. We cannot refute their claim. Another example of a one-sample test for proportions:

What would happen if we only had one bag of M&M’s actually agrees with the advertised amount.s, and it was the bag of 60 with only 5 Red? Is this too few Red’s actually agrees with the advertised amount.s? Are there really less Red M&M’s actually agrees with the advertised amount.s than the advertised amount? Still using the Steps in Hypothesis Testing:

  1. State H 0 (it ALWAYS has the = ) and HA (it’s actually agrees with the advertised amount.s sign depends on the question asked). Again, the null hypothesis is the advertised percent, 20%. Now, however, we want to know if the true proportion is really less than the stated amount, so we should test: H 0 : Red = 0.20 vs. HA: Red < 0.
  2. Determine the appropriate -level (depending on the consequence of Type I and II errors). Let’s actually agrees with the advertised amount.s stay with the standard 5% -level.
  3. Determine the appropriate test and calculate a p -value (use Labs=>Calculating Tests of Hypotheses and the flowchart to determine which Case ). For this data, we will again use Case 6, the normal approximation for proportions. NOTE: 5 out of 60 is barely the necessary amount. Case 6 says we need to give n and p. So, we put 0.05 in the box labelled alpha , 60 in the n box, 0.083 in the p box, 0.20 in the hyp value (hypothesized value, the number in H 0 ) box, and finally click on Left-sided in the Test box. The output and graph are: Left-Sided Test for 0-1 proportion pi (approximate): alpha =. Hypothesized value =. n = 60, p =. Z_calc = -2. Critical value: -1. Reject H_ p-value =.
  4. State the conclusion (if p -value  , reject H 0 ; otherwise, fail to reject) in terms of the hypothesis (answer the question asked). Since the p-value = 0.012 which IS <  = 0.05, we reject our null hypothesis and state that there is sufficient evidence to conclude that the true proportion of Red M&M’s actually agrees with the advertised amount.s, Red, is actually LESS than 20%. We can say that Red is statisitically significantly less than 20%. In other words, our data disagrees with the advertised amount enough to dispute M&M’s actually agrees with the advertised amount.s claim. Why is there a difference? First, you need to think of what the significance level, , means and what a hypothesis test actually does. Remember, we said there was a distribution of Red M&M’s actually agrees with the advertised amount.s, or the proportion of Red M&M’s actually agrees with the advertised amount.s in a regular size bag. The significance level,  = 5%, means that we will be ‘throwing out’s actually agrees with the advertised amount. 5% of this distribution and therefore WRONG 5% of the time. In hypothesis testing, we assume that the center of our normal curve is the hypothesized value (here it’s actually agrees with the advertised amount.s 20%) and calculate where our data falls on this curve. We just happened to get a bag out there on the tail! Look at the interpretation of the p-value: If the true proportion of Red M&M’s actually agrees with the advertised amount.s, Red, is actually 20%, we would see 8.3% or less Red M&M’s actually agrees with the advertised amount.s only 1.2% of the time. This sample wouldn’s actually agrees with the advertised amount.t happen very often, but it is still possible. An example of a two-sample test for proportions:

To test multiple proportions, we must run a ^2 Test. There is an Excel file, ‘wstataq\sp01\Chi2oneway.xls’s actually agrees with the advertised amount. to help. You just enter the hypothesized proportions and the actual (observed) counts, and it does all the calculations. Example of One-Way Chi-Square Test Null Hypothesis: Brown = 0.30, Yellow = 0.20, Red = 0.20, Green = 0.10, Blue = 0.10, Orange = 0. Color Ho: pi Obs Cnt Exp Cnt (E-O)^2/E Brown 0.3 18 16.8 0. Yellow 0.2 10 11.2 0. Red 0.2 11 11.2 0. Green 0.1 5 5.6 0. Blue 0.1 6 5.6 0. Orange 0.1 6 5.6 0. Total 1 56 56 0. chi-square 0. df 5 p-value 0. Since the p-value = 0.997, it seems that our data agrees with M&M. We use the ^2 for this type of test because we’s actually agrees with the advertised amount.re calculating a different test statistic. Here, we’s actually agrees with the advertised amount.re looking at the difference between what happened (the observed counts) and what we would expect if the null hypothesis is true (the expected counts). NOTE: Remember, since the proportion is just the count/total, ( p =x/n), then the expected count is just the true proportion*total (xexp = n). If the difference is small (0 would be the minimum in absolute difference), then the null is plausible and the p-value is large. A large difference would only happen rarely, so if it is so large that the chance of it happening (the p-value) is small (< ), we reject the null. There is also an Excel file, ‘wstataq\sp01\Chi2twoway.xls’s actually agrees with the advertised amount. which will run the two way table in Chapter 6 of Mind on Statistics.