Download presentation

Presentation is loading. Please wait.

Published byFrederick Levins Modified over 2 years ago

1
1 1 Slide © 2003 South-Western /Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University

2
2 2 Slide © 2003 South-Western /Thomson Learning™ Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial Population n Test of Independence n Goodness of Fit Test: Poisson and Normal Distributions

3
3 3 Slide © 2003 South-Western /Thomson Learning™ Goodness of Fit Test: A Multinomial Population 1. Set up the null and alternative hypotheses. 2. Select a random sample and record the observed frequency, f i, for each of the k categories. 3. Assuming H 0 is true, compute the expected frequency, e i, in each category by multiplying the category probability by the sample size. continued

4
4 4 Slide © 2003 South-Western /Thomson Learning™ Goodness of Fit Test: A Multinomial Population 4. Compute the value of the test statistic. 5. Rejection rule: Using test statistic: Reject H 0 if Using p -value: Reject H 0 if p -value < (where is the significance level and there are k - 1 degrees of freedom)

5
5 5 Slide © 2003 South-Western /Thomson Learning™ Example: Finger Lakes Homes (A) Finger Lakes Homes manufactures four models of prefabricated homes, a two-story colonial, a ranch, a split-level, and an A-frame. To help in production planning, management would like to determine if previous customer purchases indicate that there is a preference in the style selected. The number of homes sold of each model for 100 sales over the past two years is shown below. Model Colonial Ranch Split-Level A-Frame Model Colonial Ranch Split-Level A-Frame # Sold 30 20 35 15 # Sold 30 20 35 15

6
6 6 Slide © 2003 South-Western /Thomson Learning™ Example: Finger Lakes Homes (A) n Notation p C = popul. proportion that purchase a colonial p R = popul. proportion that purchase a ranch p S = popul. proportion that purchase a split-level p A = popul. proportion that purchase an A-frame n Hypotheses H 0 : p C = p R = p S = p A =.25 H a : The population proportions are not p C =.25, p R =.25, p S =.25, and p A =.25 p C =.25, p R =.25, p S =.25, and p A =.25

7
7 7 Slide © 2003 South-Western /Thomson Learning™ Example: Finger Lakes Homes (A) n Expected Frequencies e 1 =.25(100) = 25 e 2 =.25(100) = 25 e 1 =.25(100) = 25 e 2 =.25(100) = 25 e 3 =.25(100) = 25 e 4 =.25(100) = 25 e 3 =.25(100) = 25 e 4 =.25(100) = 25 n Test Statistic = 1 + 1 + 4 + 4 = 10

8
8 8 Slide © 2003 South-Western /Thomson Learning™ n Rejection Rule With =.05 and With =.05 and k - 1 = 4 - 1 = 3 k - 1 = 4 - 1 = 3 degrees of freedom degrees of freedom 22 22 7.81 Do Not Reject H 0 Reject H 0 Example: Finger Lakes Homes (A)

9
9 9 Slide © 2003 South-Western /Thomson Learning™ Example: Finger Lakes Homes (A) n Conclusion 2 = 10 > 7.81, so we reject the assumption there is no home style preference, at the.05 level of significance.

10
10 Slide © 2003 South-Western /Thomson Learning™ n Worksheet (showing data) Using Excel to Conduct a Goodness of Fit Test Note: Rows 13-101 are not shown.

11
11 Slide © 2003 South-Western /Thomson Learning™ Using Excel to Conduct a Goodness of Fit Test n Formula Worksheet Note: Columns A-B and rows 13-101 are not shown.

12
12 Slide © 2003 South-Western /Thomson Learning™ n Value Worksheet Using Excel to Conduct a Goodness of Fit Test Note: Columns A-B and rows 13-101 are not shown.

13
13 Slide © 2003 South-Western /Thomson Learning™ n Using the p -Value The value worksheet shows that the resulting p - value is 0.0186. The value worksheet shows that the resulting p - value is 0.0186. The rejection rule is “Reject H 0 if p -value < ” The rejection rule is “Reject H 0 if p -value < ” Because.0186 <.05, we reject H 0 and conclude that the population proportions are not all equal to.25 (we reject the assumption there is no home style preference) Because.0186 <.05, we reject H 0 and conclude that the population proportions are not all equal to.25 (we reject the assumption there is no home style preference) Using Excel to Conduct a Goodness of Fit Test

14
14 Slide © 2003 South-Western /Thomson Learning™ Test of Independence: Contingency Tables 1. Set up the null and alternative hypotheses. 2. Select a random sample and record the observed frequency, f ij, for each cell of the contingency table. 3. Compute the expected frequency, e ij, for each cell.

15
15 Slide © 2003 South-Western /Thomson Learning™ Test of Independence: Contingency Tables 4. Compute the test statistic. 5. Reject H 0 if, where is the significance level and with n rows and m columns there are ( n - 1)( m - 1) degrees of freedom.

16
16 Slide © 2003 South-Western /Thomson Learning™ Example: Finger Lakes Homes (B) Each home sold can be classified according to price and to style. Finger Lakes Homes’ manager would like to determine if the price of the home and the style of the home are independent variables. Each home sold can be classified according to price and to style. Finger Lakes Homes’ manager would like to determine if the price of the home and the style of the home are independent variables. The number of homes sold for each model and price for the past two years is shown below. For convenience, the price of the home is listed as either $65,000 or less or more than $65,000. Price Colonial Ranch Split-Level A-Frame Price Colonial Ranch Split-Level A-Frame < $65,000 18 6 19 12 < $65,000 18 6 19 12 > $65,000 12 14 16 3 > $65,000 12 14 16 3

17
17 Slide © 2003 South-Western /Thomson Learning™ Example: Finger Lakes Homes (B) n Hypotheses H 0 : Price of the home is independent of the style of the home that is purchased H 0 : Price of the home is independent of the style of the home that is purchased H a : Price of the home is not independent of the H a : Price of the home is not independent of the style of the home that is purchased style of the home that is purchased n Expected Frequencies Price Colonial Ranch Split-Level A-Frame Total Price Colonial Ranch Split-Level A-Frame Total < $99K 18 6 19 12 55 > $99K 12 14 16 3 45 Total 30 20 35 15 100 Total 30 20 35 15 100

18
18 Slide © 2003 South-Western /Thomson Learning™ n Test Statistic =.1364 + 2.2727 +... + 2.0833 = 9.1486 =.1364 + 2.2727 +... + 2.0833 = 9.1486 n Rejection Rule With =.05 and (2 - 1)(4 - 1) = 3 d.f., With =.05 and (2 - 1)(4 - 1) = 3 d.f., Reject H 0 if 2 > 7.81 Reject H 0 if 2 > 7.81 n Conclusion We reject H 0, the assumption that the price of the home is independent of the style of the home that is purchased. We reject H 0, the assumption that the price of the home is independent of the style of the home that is purchased. Example: Finger Lakes Homes (B)

19
19 Slide © 2003 South-Western /Thomson Learning™ Using Excel to Conduct a Test of Independence n Worksheet (showing data entered) Note: Rows 11-101 are not shown.

20
20 Slide © 2003 South-Western /Thomson Learning™ n Worksheet (showing Pivot Table) Using Excel to Conduct a Test of Independence Note: Columns A-C (sample data) are not shown.

21
21 Slide © 2003 South-Western /Thomson Learning™ n Formula Worksheet Using Excel to Conduct a Test of Independence Note: Columns A-C (sample data) are not shown.

22
22 Slide © 2003 South-Western /Thomson Learning™ n Value Worksheet Using Excel to Conduct a Test of Independence Note: Columns A-C (sample data) are not shown.

23
23 Slide © 2003 South-Western /Thomson Learning™ Goodness of Fit Test: Poisson Distribution 1. Set up the null and alternative hypotheses. H 0 : Population has a Poisson probability distribution. H 0 : Population has a Poisson probability distribution. H a : Population does not have a Poisson probab. distrib. H a : Population does not have a Poisson probab. distrib. 2. Select a random sample and a. Record the observed frequency f i for each value of the Poisson random variable. b. Compute the mean number of occurrences . 3. Compute the expected frequency of occurrences e i for each value of the Poisson random variable. continued

24
24 Slide © 2003 South-Western /Thomson Learning™ Goodness of Fit Test: Poisson Distribution 4. Compute the value of the test statistic. 5.Rejection rule: Using test statistic: Reject H 0 if Using p -value: Reject H 0 if p -value < (where is the significance level and there are k - 2 degrees of freedom). there are k - 2 degrees of freedom).

25
25 Slide © 2003 South-Western /Thomson Learning™ Example: Troy Parking Garage n Poisson Distribution Goodness of Fit Test In studying the need for an additional entrance to a city parking garage, a consultant has recommended an approach that is applicable only in situations where the number of cars entering during a specified time period follows a Poisson distribution. In studying the need for an additional entrance to a city parking garage, a consultant has recommended an approach that is applicable only in situations where the number of cars entering during a specified time period follows a Poisson distribution.

26
26 Slide © 2003 South-Western /Thomson Learning™ A random sample of 100 one-minute time intervals resulted in the customer arrivals listed below. A statistical test must be conducted to see if the assumption of a Poisson distribution is reasonable. A random sample of 100 one-minute time intervals resulted in the customer arrivals listed below. A statistical test must be conducted to see if the assumption of a Poisson distribution is reasonable. # Arrivals 0 1 2 3 4 5 6 7 8 9 10 11 12 # Arrivals 0 1 2 3 4 5 6 7 8 9 10 11 12 Frequency 0 1 4 10 14 20 12 12 9 8 6 3 1 Frequency 0 1 4 10 14 20 12 12 9 8 6 3 1 Example: Troy Parking Garage

27
27 Slide © 2003 South-Western /Thomson Learning™ Example: Troy Parking Garage n Hypotheses H 0 : Number of cars entering the garage during H 0 : Number of cars entering the garage during a one-minute interval is Poisson distributed. a one-minute interval is Poisson distributed. H a : Number of cars entering the garage during a one-minute interval is not Poisson distributed H a : Number of cars entering the garage during a one-minute interval is not Poisson distributed

28
28 Slide © 2003 South-Western /Thomson Learning™ Example: Troy Parking Garage n Estimate of Poisson Probability Function otal Arrivals = 0(0) + 1(1) + 2(4) +... + 12(1) = 600 Total Time Periods = 100 Total Time Periods = 100 Estimate of = 600/100 = 6 Estimate of = 600/100 = 6 Hence, Hence,

29
29 Slide © 2003 South-Western /Thomson Learning™ Example: Troy Parking Garage n Expected Frequencies x f ( x ) xf ( x ) x f ( x ) xf ( x ) 0.0025.25 7.138913.89 0.0025.25 7.138913.89 1.0149 1.49 8.104110.41 1.0149 1.49 8.104110.41 2.0446 4.46 9.06946.94 2.0446 4.46 9.06946.94 3.0892 8.9210.04174.17 3.0892 8.9210.04174.17 4.133913.3911.02272.27 4.133913.3911.02272.27 5.162016.2012.01551.55 5.162016.2012.01551.55 6.160616.06 Total1.0000100.00 6.160616.06 Total1.0000100.00

30
30 Slide © 2003 South-Western /Thomson Learning™ Example: Troy Parking Garage n Observed and Expected Frequencies i f i e i f i - e i i f i e i f i - e i 0 or 1 or 256.20-1.20 0 or 1 or 256.20-1.20 3108.921.08 41413.390.61 52016.063.94 61216.06-4.06 71213.77-1.77 8910.33-1.33 986.881.12 10 or more108.381.62 10 or more108.381.62

31
31 Slide © 2003 South-Western /Thomson Learning™ n Test Statistic n Rejection Rule With =.05 and k - p - 1 = 9 - 1 - 1 = 7 d.f. (where k = number of categories and p = number of population parameters estimated), With =.05 and k - p - 1 = 9 - 1 - 1 = 7 d.f. (where k = number of categories and p = number of population parameters estimated), Reject H 0 if 2 > 14.07 Reject H 0 if 2 > 14.07 n Conclusion We cannot reject H 0. There’s no reason to doubt the assumption of a Poisson distribution. We cannot reject H 0. There’s no reason to doubt the assumption of a Poisson distribution. Example: Troy Parking Garage

32
32 Slide © 2003 South-Western /Thomson Learning™ Using Excel to Conduct a Poisson Distribution Goodness of Fit Test n Formula Worksheet

33
33 Slide © 2003 South-Western /Thomson Learning™ n Value Worksheet Using Excel to Conduct a Poisson Distribution Goodness of Fit Test

34
34 Slide © 2003 South-Western /Thomson Learning™ n Using the p -Value The value worksheet shows a p -value of.8591. The value worksheet shows a p -value of.8591. The rejection rule is “Reject H 0 if p -value < ” The rejection rule is “Reject H 0 if p -value < ” With.8591 > =.05, we cannot reject the null hypothesis that the number of cars entering the garage during a one-minute interval is Poisson distributed With.8591 > =.05, we cannot reject the null hypothesis that the number of cars entering the garage during a one-minute interval is Poisson distributed Using Excel to Conduct a Poisson Distribution Goodness of Fit Test

35
35 Slide © 2003 South-Western /Thomson Learning™ Goodness of Fit Test: Normal Distribution 1. Set up the null and alternative hypotheses. 2. Select a random sample and a. Compute the mean and standard deviation. a. Compute the mean and standard deviation. b. Define intervals of values so that the expected b. Define intervals of values so that the expected frequency is at least 5 for each interval. frequency is at least 5 for each interval. c. For each interval record the observed frequencies c. For each interval record the observed frequencies 3. Compute the expected frequency, e i, for each interval. continued

36
36 Slide © 2003 South-Western /Thomson Learning™ Goodness of Fit Test: Normal Distribution 4. Compute the value of the test statistic. 5. Reject H 0 if (where is the significance level and there are k - 3 degrees of freedom). and there are k - 3 degrees of freedom).

37
37 Slide © 2003 South-Western /Thomson Learning™ Example: Victor Computers n Normal Distribution Goodness of Fit Test Victor Computers manufactures and sells a Victor Computers manufactures and sells a general purpose microcomputer. As part of a study to evaluate sales personnel, management wants to determine if the annual sales volume (number of units sold by a salesperson) follows a normal probability distribution.

38
38 Slide © 2003 South-Western /Thomson Learning™ A simple random sample of 30 of the salespeople was taken and their numbers of units sold are below. 33 43 44 45 52 52 56 58 63 64 64 65 66 68 70 72 73 73 74 75 83 84 85 86 91 92 94 98 102 105 (mean = 71, standard deviation = 18.54) (mean = 71, standard deviation = 18.54) Example: Victor Computers

39
39 Slide © 2003 South-Western /Thomson Learning™ n Hypotheses H 0 : The population of number of units sold has a normal distribution with mean 71 and standard deviation 18.54. H 0 : The population of number of units sold has a normal distribution with mean 71 and standard deviation 18.54. H a : The population of number of units sold does not have a normal distribution with mean 71 and standard deviation 18.54. H a : The population of number of units sold does not have a normal distribution with mean 71 and standard deviation 18.54. Example: Victor Computers

40
40 Slide © 2003 South-Western /Thomson Learning™ n Interval Definition To satisfy the requirement of an expected frequency of at least 5 in each interval we will divide the normal distribution into 30/5 = 6 To satisfy the requirement of an expected frequency of at least 5 in each interval we will divide the normal distribution into 30/5 = 6 equal probability intervals. Example: Victor Computers

41
41 Slide © 2003 South-Western /Thomson Learning™ Example: Victor Computers n Interval Definition Areas = 1.00/6 =.1667 Areas = 1.00/6 =.1667 71 53.02 63.03 78.97 88.98 = 71 +.97(18.54)

42
42 Slide © 2003 South-Western /Thomson Learning™ n Observed and Expected Frequencies i f i e i f i - e i i f i e i f i - e i Less than 53.02651 Less than 53.02651 53.02 to 63.0335-2 53.02 to 63.0335-2 63.03 to 71.00651 63.03 to 71.00651 71.00 to 78.97550 71.00 to 78.97550 78.97 to 88.9845-1 78.97 to 88.9845-1 More than 88.98651 More than 88.98651 Total3030 Total3030 Example: Victor Computers

43
43 Slide © 2003 South-Western /Thomson Learning™ n Test Statistic n Rejection Rule With =.05 and k - p - 1 = 6 - 2 - 1 = 3 d.f., With =.05 and k - p - 1 = 6 - 2 - 1 = 3 d.f., Reject H 0 if 2 > 7.81 Reject H 0 if 2 > 7.81 n Conclusion We cannot reject H 0. There is little evidence to We cannot reject H 0. There is little evidence to support rejecting the assumption the population is normally distributed with = 71 and = 18.54. support rejecting the assumption the population is normally distributed with = 71 and = 18.54. Example: Victor Computers

44
44 Slide © 2003 South-Western /Thomson Learning™ n Formula Worksheet Using Excel to Conduct a Normal Distribution Goodness of Fit Test

45
45 Slide © 2003 South-Western /Thomson Learning™ n Value Worksheet Using Excel to Conduct a Normal Distribution Goodness of Fit Test

46
46 Slide © 2003 South-Western /Thomson Learning™ n Using the p -Value The value worksheet shows a p -value of.6594. The value worksheet shows a p -value of.6594. The rejection rule is “Reject H 0 if p -value < ” The rejection rule is “Reject H 0 if p -value < ” With.6594 > =.05, we cannot reject the assumption that the number of units sold by a salesperson follows a Normal distribution With.6594 > =.05, we cannot reject the assumption that the number of units sold by a salesperson follows a Normal distribution Using Excel to Conduct a Normal Distribution Goodness of Fit Test

47
47 Slide © 2003 South-Western /Thomson Learning™ End of Chapter 12

Similar presentations

OK

Goodness of Fit Test for Proportions of Multinomial Population Chi-square distribution Hypotheses test/Goodness of fit test.

Goodness of Fit Test for Proportions of Multinomial Population Chi-square distribution Hypotheses test/Goodness of fit test.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on idiopathic thrombocytopenia purpura therapy Download ppt on world trade organization Ppt on central limit theorem in statistics Ppt on digital media broadcasting Ppt on advancing and retreating monsoon Ppt on manufacturing of turbo generators manufacturers Ppt on food security in india Ppt on computer languages for gaming Ppt on product advertising ideas Ppt on acid bases and salts for class 10