DOC PREVIEW
UNC-Chapel Hill STOR 151 - Review of Last Class- Testing a Proportion

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Review of Last Class: Testing a ProportionSuppose the data are a sample proportion ˆp from the sampleof size n where the true population proportion is an unknownquantity p. The null hypothesis isH0: p = p0where p0is some given proportion.The alternative hypothesis is almost always one ofHa: p > p0, or (1)Ha: p < p0, or (2)Ha: p 6= p0. (3)where the choice among (1)–(3) depends on the context of theproblem.1Test statisticz =ˆp − p0rp0(1−p0)n. (4)If H0is true, then z has a standard normal distribution with mean0 and standard deviation 1.2Side comment:The formula for the standard error issp0(1 − p0)n.This is different from the confidence interval calculation whereit’ssˆp(1 − ˆp)n.The difference is that in a hypothesis testing problem, we alreadyhave a specific value p0that we’re testing against. Therefore, itmakes sense to use that as the basis for calculating a standarderror.3Computing the P-valueThe calculation of the P-value depends on the alternative hy-pothesis.For (1), compute Pr{Z > z} where Z is a standard normal ran-dom variable and z is the number computed in (4).For (2), compute Pr{Z < z}.For (3), compute Pr{Z < −|z|} + Pr{Z > |z|} where |z| meansthe magnitude of z (ignoring the sign). In practice, this almostalways results in twice the P-value computed for (1) or (2).4Another side comment:In the example with n = 31, p0= 0.067, X = 6, the usualcondition np0> 15, n(1 − p0) > 15 is not satisfied (becausenp0= 2.077). We could do an exact calculation, as follows.The problem is to calculate Pr{X ≥ 6} when X has a binomialdistribution with n = 31, p = .067. This is 1 − Pr{X ≤ 5}.1. In Excel, go to Formulas → More Functions → Statistical →BINOMDIST2. Enter “Number” =5, “Trials” =31, “Probability”=.067, “Cu-mulative”=TRUE.3. The answer comes up as 0.9844. Therefore, 1 − .9844 =.0156 is the required (one-sided) P-value.5Interpreting the P-value1. It’s usual to interpret a P-value less than .05 as “significant”.However if it’s very important to make sure we don’t get aspurious result, we may adopt a more stringent criterion, e.g.P< .01.2. In presenting research results, a common practice is just toignore results for which P> .05, but when P< .05, state theexact P-value. That way, the reader can judge for herselfjust how strong the result it. This is what they did in thepaper about skin cancer in marathon runners.6Testing the mean of a quantitative variableAn example: The mean height of male students at the Universityof Georgia (page 64) was 71 inches.In a sample of 14 male students in this class, the mean ¯x was72.57 inches and the standard deviation s was 3.131 inches.Is this a statistically significant difference?Let’s set this up as a formal hypothesis test.7Assume that the students in this class are a random sample ofthe population of all male students at UNC, and let µ be themean height of that population. Also write µ0= 71. The nullhypothesis isH0: µ = µ0.For the alternative hypothesis, we again have three possibilitiesanalogous to (1)–(3), namelyHa: µ > µ0, (5)Ha: µ < µ0, (6)Ha: µ 6= µ0. (7)In this case, there is no a priori reason to think that the studentsat UNC are either taller or shorter than the students at theUniversity of Georgia, so it is most logical to choose (7) as ouralternative hypothesis.8We are given ¯x = 72.57, and its standard error iss√n=3.131√14=0.8368. The t statistic ist =¯x − µS.E.=72.57 − 710.8368= 1.876.If H0is true, then t has a t distribution with degrees of freedomdf = n − 1 = 13, by the same theory as used for confidenceintervals in Chapter 8. Therefore the P-value is the probabilitythat a random variable with the t13distribution is greater than1.876, multiplied by 2 (because it is a two-tailed test — thereforet < −1.876 has the same meaning as t > 1.876).At this point, I’m going to differ a little from what the booktells you to do (on page 431). They recommend the use of theMinitab software package to find the exact P-value. I’m goingto show you how to get the approximate value from the table onpage A3.9Confidence leveldf 80% 90% 95% 98% 99% 99.8%1 3.078 6.314 12.706 31.821 63.657 318.3092 1.886 2.920 4.303 6.965 9.925 22.3273 1.638 2.353 3.182 4.541 5.841 10.2154 1.533 2.132 2.776 3.747 4.604 7.1735 1.476 2.015 2.571 3.365 4.032 5.8936 1.440 1.943 2.447 3.143 3.707 5.2087 1.415 1.895 2.365 2.998 3.499 4.7858 1.397 1.860 2.306 2.896 3.355 4.5019 1.383 1.833 2.262 2.821 3.250 4.29710 1.372 1.812 2.228 2.764 3.169 4.14411 1.363 1.796 2.201 2.718 3.106 4.02512 1.356 1.782 2.179 2.681 3.055 3.93013 1.350 1.771 2.160 2.650 3.012 3.85214 1.345 1.761 2.145 2.624 2.977 3.78715 1.341 1.753 2.131 2.602 2.947 3.73316 1.337 1.746 2.120 2.583 2.921 3.68617 1.333 1.740 2.110 2.567 2.898 3.64618 1.330 1.734 2.101 2.552 2.878 3.61019 1.328 1.729 2.093 2.539 2.861 3.57920 1.325 1.725 2.086 2.528 2.845 3.55221 1.323 1.721 2.080 2.518 2.831 3.52722 1.321 1.717 2.074 2.508 2.819 3.50523 1.319 1.714 2.069 2.500 2.807 3.48524 1.318 1.711 2.064 2.492 2.797 3.46725 1.316 1.708 2.060 2.485 2.787 3.45026 1.315 1.706 2.056 2.479 2.779 3.43527 1.314 1.703 2.052 2.473 2.771 3.42128 1.313 1.701 2.048 2.467 2.763 3.40829 1.311 1.699 2.045 2.462 2.756 3.39630 1.310 1.697 2.042 2.457 2.750 3.38540 1.303 1.684 2.021 2.423 2.704 3.30750 1.299 1.676 2.009 2.403 2.678 3.26160 1.296 1.671 2.000 2.390 2.660 3.23280 1.292 1.664 1.990 2.374 2.639 3.195100 1.290 1.660 1.984 2.364 2.626 3.174Inf 1.282 1.645 1.960 2.327 2.576 3.09110In this table, corresponding to df = 13, we find t values of 1.350,1.771, 2.160, 2.650, 3.012, 3.852 corresponding to confidencelevels of 80%, 90%, 95%, 98%, 99%, 99.8%.The two-sided P-value is one minus the confidence level, ex-pressed as a decimal fraction.Thus, only a t value bigger than 2.160 would be considered“significant” with a P-value of .05 or less.Since in this case t = 1.876, the P-value is between 0.1 and 0.05.Since this is bigger than .05, this is not significant. We acceptthe null hypothesis µ = 71. The students at the University ofNorth Carolina are not significantly different from those as theUniversity of Georgia (as we would have expected).11An alternative calculationSuppose, however, the mean of the UNC students was 73.5inches. In this case we would calculate t =73.5−710.8368=2.988.In the table, this comes out between confidence levels 98%and 99% — in other words, the 2-sided P-value is between 1–0.98=0.02 and 1–0.99=0.01.If we


View Full Document

UNC-Chapel Hill STOR 151 - Review of Last Class- Testing a Proportion

Download Review of Last Class- Testing a Proportion
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Review of Last Class- Testing a Proportion and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Review of Last Class- Testing a Proportion 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?