Test Of Goodness Of Fit - Lecture 42 Section 14

2y ago
1 Views
1 Downloads
511.51 KB
55 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Kaleb Stephen
Transcription

Test ofGoodness ofFitRobb -SquareStatisticTest of Goodness of FitLecture 42Section 14.3Robb T. KoetherGoodness-ofFit Test on theTI-83Hampden-Sydney CollegeMale vs.Female BirthsAgainFri, Nov 14, 2008Assignment

OutlineTest ofGoodness ofFit1Homework ReviewHomeworkReview2The Goodness-of-Fit TestTheGoodness-ofFitTest3The Chi-Square StatisticTheChi-SquareStatistic4Goodness-of-Fit Test on the TI-83Goodness-ofFit Test on theTI-835Male vs. Female Births AgainMale vs.Female BirthsAgain6AssignmentRobb T.KoetherAssignment

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomework ReviewSix basic questions.Are we testing hypotheses or finding a confidenceinterval?Does the problem concern means or proportions?Is there one sample or are there two samples?If the problem concerns means, then the next twoquestions are:Is σ known?Is the population normal?Finally,Is the sample size large?

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExercise 11.28, page 712.A toothpaste manufacturer claims that childrenbrushing their teeth daily with his company’s newtoothpaste product will have fewer cavities than childrenusing a competitor’s brand.In a carefully supervised study in which children wererandomly assigned to one of the two brands oftoothpaste for a 2-year period, the number of cavitiesfor children using the new brand was compared withthe number of cavities for children using thecompetitor’s brand.

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExercise 11.28, page 712.The results are as follows:New Brand:Competitor Brand:2311112430172131441621Test the manufacturer’s claim using a significance levelof 0.01.

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionAre we testing hypotheses or finding a -SampZTest 2-SampZInt2-SampTTest 2-SampTInt1-PropZTest 1-PropZInt2-PropZTest 2-PropZInt

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionAre we testing hypotheses or finding a -SampZTest 2-SampZInt2-SampTTest 2-SampTInt1-PropZTest 1-PropZInt2-PropZTest 2-PropZInt

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionDoes the problem concern means or does it est2-SampZTest2-SampTTest

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionDoes the problem concern means or does it est2-SampZTest2-SampTTest

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionDoes the problem involve one sample or two samples?Z-Test 2-SampZTestT-Test 2-SampTTest

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionDoes the problem involve one sample or two samples?Z-Test 2-SampZTestT-Test 2-SampTTest

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionTo choose between 2-SampZTest and 2-SampTTest,we need to knowAre σ1 and σ2 not known?Are the populations normal?Are the sample sizes small?2-SampZTest2-SampTTest

Homework ReviewTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentSolutionTo choose between 2-SampZTest and 2-SampTTest,we need to knowAre σ1 and σ2 not known? YESAre the populations normal? YES (QQ Plot)Are the sample sizes small? YES2-SampZTest2-SampTTest

The HypothesesTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExample (Goodness-of-Fit Test)We are testing the hypothesis that the distributions ofcolors in plain M&Ms n16%Yellow14%Brown13%Red13%

The HypothesesTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExample (Goodness-of-Fit Test)From two packages of plain M&Ms, we obtained thefollowing w23Brown12Red10

The HypothesesTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentThe null hypothesis specifies the probability (orproportion) for each color.The null hypothesis isH0 : p1 0.24, p2 0.20, p3 0.16,p4 0.14, p5 0.13, p6 0.13.The alternative hypothesis will always be a simplenegation of H0 :H1 : H0 is false.Let α 0.05.

Expected CountsTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentThe test statistic will involve the observed and theexpected counts.To find the expected counts, we apply the hypotheticalproportions to the sample size.For example, the hypothetical proportion for red is 24%,so we compute 24% of 114:0.24 114 27.36.Do not round the values off to whole numbers.

The Test StatisticTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentMake a chart showing both the observed counts andthe expected counts (in (14.82)Red10(14.82)

The Test StatisticTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentDenote the observed counts by O and the expectedcounts by E.Define the chi-square (χ2 ) statistic to beχ2 X (O E)2.Eall cells

The Value of the Test StatisticTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentClearly, if all of the deviations O E are small, then χ2will be small.But if even a few the deviations O E are large, then χ2will be large.

The Value of the Test StatisticTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentNow calculate χ2 .(20 27.36)2 (24 22.80)2 (25 18.24)2 27.3622.8018.24(23 15.96)2 (12 14.82)2 (10 14.82)2 15.9614.8214.82 1.9799 0.0632 2.5054χ2 3.1054 0.5366 1.5676 9.7581.

Compute the p-ValueTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentThe p-value is the likelihood of observing a χ2 value aslarge at 9.7581.To find that value, we need to know something aboutthe distribution of χ2 .

Chi-Square Degrees of FreedomTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentThe χ2 distribution has an associated degrees offreedom, just like the t distribution.Each χ2 distribution has a slightly different shape,depending on the number of degrees of freedom.For example, we let χ25 denote the chi-square statisticwith 5 degrees of freedom.Definition (χ2 degrees of freedom)In a goodness-of-fit test, the number of degrees of freedomis one less than the number of cells.

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ21Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ22Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ23Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ24Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ25Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ26Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ27Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Chi-Square Degrees of FreedomTest ofGoodness ofFitThe Graph of χ28Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgain0.20.150.10.05Assignment2.557.51012.515

Properties of χ2Test ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentThe chi-square distribution with df degrees of freedomhas the following properties.χ2 0.It is unimodal.It is skewed right (not symmetric!)µχ2 df .σχ2 2df .If df is large, then χ2df is approximately normal with mean df and standard deviation 2df .

Chi-Square vs. NormalTest ofGoodness ofFitThe graph of χ28 vs. N(8, 4)Robb t0.08TheChi-SquareStatistic0.06Goodness-ofFit Test on theTI-830.04Male vs.Female BirthsAgain0.02Assignment-55101520

Chi-Square vs. NormalTest ofGoodness ofFitThe graph of χ232 vs. N(32, 8)Robb stTheChi-SquareStatistic0.040.03Goodness-ofFit Test on theTI-830.02Male vs.Female BirthsAgain0.01Assignment102030405060

Chi-Square vs. NormalTest ofGoodness ofFitThe graph of χ2128 vs. N(128, 16)Robb eChi-SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female 20140160180

Chi-Square vs. NormalTest ofGoodness ofFitThe graph of χ2512 vs. N(512, 32)Robb .012TheChi-SquareStatisticGoodness-ofFit Test on theTI-830.010.0080.0060.004Male vs.Female BirthsAgain0.002Assignment450500550600

TI-83 - Chi-Square ProbabilitiesTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentTI-83 Chi-square ProbabilitiesPress 2nd DISTR.Select χ2 cdf.Enter the lower endpoint, the upper endpoint, and thedegrees of freedom.Press ENTER. The probability appears in the display.

TI-83 - Chi-Square ProbabilitiesTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentPracticeFind P(χ2 6) with df 3.Find P(20 χ2 30) with df 25.Find P(χ2 10) with df 6.

The Goodness-of-Fit TestTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentIn our example, we found χ2 9.7581.There are 6 categories (colors), so there are 5 degreesof freedom.The p-value isχ2 cdf(9.7581,E99,5) 0.0823.That is greater than α, so we accept H0 .We conclude that the colors fit the distribution given bythe Mars Candy Company.

The Goodness-of-Fit TestTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExample (The Goodness-of-Fit Test)(1) H0 : p1 0.24, p2 0.20, p3 0.16, p4 0.14,p5 0.13, p6 0.13H1 : H0 is not true.(2) α 0.05.P(3) χ2 all cells(4)(O E)2.EBlueOrangeColorObserved20(Expected) (27.36)χ2 12(14.82)Red10(14.82)(5) p-value χ2 cdf(9.7581,E99,5) 0.0823.(6) Accept H0 .(7) The color distribution in plain M&Ms is what the MarsCandy Company advertises it is.

Goodness-of-Fit Test on the TI-83Test ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentBe careful when using the TI-83!There is a function called χ2 -Test, but it does notperform this test.Be careful! On the TI-83 there is a function calledχ2 -Test, but it does not perform this test.Some TI-84s have a GOF-Test function.The GOF-Test function does perform this test.

Goodness-of-Fit Test on the TI-83Test ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentTI-83 Goodness-of-fit testPut the observed counts in list L1 .Put the hypothetical proportions in list L2 .Multiply L2 by the sample size and store as L2 . Theseare the expected counts.Calculate (L1 -L2 )2 /L2 .Go to LIST MATH and select sum (item #5).Enter Ans and press ENTER. The value of χ2 appears.Then use χ2 cdf to find the p-value.

Example - Male vs. Female BirthsTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExample (TI-83 Goodness-of-fit test)Suppose we observe 1000 births and find that 520 aremale and 480 are female.Does this indicate that male births and female birthsare not equally likely?

Example - Male vs. Female BirthsTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExample (TI-83 Goodness-of-fit test)(1) Let p1 proportion of male births.Let p2 proportion of female births.H0 : p1 0.50, p2 0.50H1 : H0 is not true.(2) α 0.05.(3) The test statistic isχ2 X (O E)2.Eall cells

Example - Male vs. Female BirthsTest ofGoodness ofFitRobb T.KoetherHomeworkReviewExample (TI-83 Goodness-of-fit test)(4) We have the odness-ofFit Test on theTI-83Male vs.Female )Female480(500)Calculate(520 500)2 (480 500)2 500500 0.8 0.8χ2 1.6

Example - Male vs. Female BirthsTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentExample (TI-83 Goodness-of-fit test)(5) The p-value isp-value χ2 cdf(1.6,E99,1) 0.2059.(6) Accept H0 .(7) The proportion of male births is 50%.

Example - Male vs. Female BirthsTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentPerform the above test as a two-tailed one-proportion ztest.That is, let the alternative hypothesis beH1 : p1 6 p2 .What is the p-value?What is the value of the test statistic z?Square that number. What do you get?

AssignmentTest ofGoodness ofFitRobb -SquareStatisticGoodness-ofFit Test on theTI-83Male vs.Female BirthsAgainAssignmentHomeworkRead Sections 14.1 - 14.3, pages 921 - 935.Let’s Do It! 14.2, 14.3.Exercises 6 - 11, 14, 15, page 935.

Goodness-of-Fit Test on the TI-83 Male vs. Female Births Again Assignment Expected Counts The test statistic will involve the observed and the expected counts. To find the expected counts, we apply the hypothetical proportions to the sample size. For example, the hypothetical proportion for

Related Documents:

The Goodness and Severity of God The goodness and severity of God The Goodness and Severity of God Romans 11 v 22 “Behold therefore the goodness and severity of God : on them which fell, severity; but toward thee, goodness, if thou continue in his goodness: otherwise thou also shalt be cut off.”

From idolatry to atheism, mankind rebelled against the grace and goodness of God. Throughout history, the Scriptures have recorded God’s goodness and severity. Rom. 11:22 Behold therefore the goodness and severity of God: on them which fell, severity; but toward thee, goodness, if thou continue

question which test should be used? a)One Sample T Test for Means b) 2 Goodness of Fit Test c)Two Sample T Test for Means d)One Sample Z Test for Means Cathy Poliak, Ph.D. cathy@math.uh.edu Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematic

Chapter 15 Learning Outcomes 1 Explain when chi-square test is appropriate Test hypothesis about shape of distribution using 2 chi-square goodness of fit Test hypothesis about relationship of variables 3 using chi-square test of independence Evaluate effect size using phi coefficient or

If at any time during the fit test the subject can taste or smell the QLFT test agent, or the QNFT device indicates loss of fit, the fit test is stopped and considered a failed fit test. This demonstrates that the facepiece has not sealed properly to the wearer's face. To try to achieve an acceptable fit, the following can be considered.

The chi-square test can be used to estimate how closely the distribution of a categorical variable matches an expected distribution (the goodness-of-fit test), or to estimate whether two categorical variables are independent of one another (the test of independence). Th

Determine the test distribution to use - Chi Square tests use X2 distribution. 4. Define the rejection regions. And draw a picture! df k-1 (where k # of categories in variable). In this case df 2-1 1. Using Appendix 6 critical (OE) E SPSS output for goodness of fit

Academic writing is a formal style of writing and is generally written in a more objective way, focussing on facts and not unduly influenced by personal opinions. It is used to meet the assessment requirements for a qualification; the publ ication requirements for academic literature such as books and journals; and documents prepared for conference presentations. Academic writing is structured .