Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Kuliah ke 14 Elementary Statistics Eleventh Edition

Presentasi serupa


Presentasi berjudul: "Kuliah ke 14 Elementary Statistics Eleventh Edition"— Transcript presentasi:

1 Kuliah ke 14 Elementary Statistics Eleventh Edition
and the Triola Statistics Series by Mario F. Triola .

2 Test of Independence, Test of Goodness of Fit and Test of Homogenity
11-1 Review and Preview 11-2 Goodness-of-fit 11-3 Contingency Tables 11-4 McNemar’s Test for Matched Pairs .

3 Section 11-1 Review and Preview
.

4 Review We began a study of inferential statistics in Chapter 7 when we presented methods for estimating a parameter for a single population and in Chapter 8 when we presented methods of testing claims about a single population. In Chapter 9 we extended those methods to situations involving two populations. In Chapter 10 we considered methods of correlation and regression using paired sample data. .

5 Preview We focus on analysis of categorical (qualitative or attribute) data that can be separated into different categories (often called cells). Hypothesis test: Observed counts agree with some claimed distribution. The contingency table or two-way frequency table (two or more rows and columns). Two-way tables involving matched pairs. Use the 2 (chi-square) distribution. .

6 Section Test of Independency
. .

7 Pengujian Hipotesis Independensi (Test of Independency) Pengujian hipotesis independensi merupakan pengujian hipotesis ketidakbergantungan(kebebasan) suatu pengelompokan hasil penelitian (sampel) dari populasi terhadap kategori populasi lain. Pengujian ini menggunakan tabel kontigensi b x k , dimana b≥ 2 dan k ≥ 2 ( b=baris ; k= kolom) Langkah langkah Pengujian : a.Menentukan formula hipotesis. Ho :kategori yg satu bebas dari kategori yg lainnya Hi :kategori yg satu tidak bebas dari kategori yg lain. B.Menentukan Taraf Nyata Taraf nyata (α) dan nilai X² tabel ditentukan dengan db = (b-1)(k-1) c.Menentukan kriteria pengujian. Ho diterima , jika X²o ≤ X² α (b-1)(k-1) Hi ditolak , jika X²o > X² α (b-1)(k-1) d.Nilai uji statistik. X²o = ∑ ( nij - e ij )² : e ij , dimana e ij = (ni)(nj) : n e.Membuat kesimpulan .

8 Contoh soal. Dari sampel random 200 laki laki yang telah berumah tangga, semuannya telah pensiun, diklasifikasikan menurut pendidikan dan banyaknya anak. Ujilah Hipotesis pada taraf nyata 5 % , bahwa banyak nya anak tidak bergantung pada tingkat pendidikan kepala keluarga. Pendidikan Banyaknya Anak Jumlah 0 - 1 2 - 3 >3 Sekolah Dasar Sekolah Menengah Perguruan Tinggi 14 19 12 37 42 17 32 10 83 78 39 45 96 59 200 .

9 N ij e ij n ij – e ij (n ij – e ij)² : e ij 14 37 32 19 42 17 12 10
Pembahasan : 1.Formula Hipotesis: Ho : banyak anak tidak terpengaruh dengan tingkat pendidikan Hi : banyak anak terpengaruh dengan tingkat pendidikan 2.Taraf Nyata: α = 5 % = 0, ; db = (3-1)(3-1) = maka X²o = 9,488 3.Kriteria Pengujian : Ho diterima , jika X²o ≤ 9, Ho ditolak , jika X² o > 9,488 4.Uji Statistik : n1 = 83 ; n2 = 78 ; n3 = 39 ; j1 = 45 ; j2 = ; j3 = 59 ;n =200 N ij e ij n ij – e ij (n ij – e ij)² : e ij 14 37 32 19 42 17 12 10 (83 x 45) : 200 = 18,7 (83 x 96) : 200 = 39,8 (83 x 59) : 200 = 24,5 (78 x 45) : 200 = 17,6 (78 x 96) : 200 = 37,4 (78 x 59) : 200 = 23 (39 x 45) : 200 = 8,8 (39 x 96) : 200 = 18,7 (39 x 59) : 200 = 11,5 - 4,7 - 2,8 7,5 1,4 4,6 - 6 3,2 - 1,7 - 1,5 1,18 0,20 2,30 0,11 0,57 1,57 1,16 0,15 Jumlah 7,44 .

10 Jadi : X² o = 7, Kesimpulan : Karena X²o = 7,44 < 9,448 , maka Ho diterima. Jadi banyaknya anak tidak bergantung dari tingkat pendidikan kepala keluarga. .

11 Soal. Dari sampel random 400 mahasiswa diklasifikasikan menurut tingkat dan kebiasaan minum minuman keras. Ujilah Hipotesis pada taraf nyata 5 % , bahwa tingkat dan kebiasaan minum minuman keras tidak berpengaruh. Kebiasaan Tingkat Jumlah I II III Peminum berat Peminum ringan Bukan Peminum 38 45 60 50 42 39 41 49 36 129 136 135 143 131 126 400 .

12 Test of Goodnes of Fit (Pengujian Hipotesis Kompatibilitas) Pengujian hipotesis Kompatibilitas atau kecocokan merupakan pengujian hipotesis untuk menentukan apakah suatu himpunan frekwensi yang diharapkan (teoritis) sama dengan frekwensi pengamatan. Langkah langkah Pengujian : 1.Menentukan Formula hipotesis. Ho : Frekwensi pengamatan sesuai dengan frekwensi yg diharapkan Hi : Frekwensi pengamatan tidak sesuai dengan frekwensi yg diharapkan 2.Menentukan taraf nyata. Taraf nyata ditentukan dengan derajad bebas (db) = k – N X²α(k-n) = k=banyak kejadian N = banyak kuantitas dari hasil pengamatan yg digunakanuntuk menghitung frekw.harapan. 3.Menentukan kriteria pengujian. Ho diterima , jika X²o ≤ X²α (k-n) Ho ditolak , jika X²o > X²α(k-n) 4.Menentukan nilai uji statistik X²o = ∑ (fo – fe)² : fe fo=frekwensi pengamatan fe=frekwensi harapan 5.Kesimpulan. .

13 Contoh Soal: Data mengenai sisi angka (A) yang muncul dari pelemparan sebuah mata uang logam sebanyak 240 kali Dengan taraf nyata 5 % , ujilah apakah bentuk distribusi di atas mengikuti distribusi binomial yang berarti bahwa frekwensi pengamatan sesuai dengan frekwensi harapan ? Banyak Muka A 1 2 3 4 5 Frekwensi pengamatan 24 36 30 42 56 52 .

14 Penyelesaian : 1. Formula Hipotesis
Penyelesaian : 1.Formula Hipotesis. Ho :distribusi frekwensi pengamatan sesuai dengan distribusi frekwensi teoritis binomial Hi :distribusi frekwensi pengamatan tidak sesuai dengan distribusi frekwensi binomial. 2.Taraf nyata : α = 5 % = 0,05 dengan db = k-n= 6-2= k=6 (banyak kejadian) N=2(banyak kuantitas untuk menghitung frekwensi harapan) X² 0,05(4) = 9,488 3.Kriteria pengujian: Ho diterima , jika X²o ≤ 9, Ho ditolak , jika X²o > 9,488 4.Nilai Uji statistik. * p(X) dihitung dengan : a.Rumus binomial b.tabel binomial dengan n=5 (banyak sisi A) dan p =0, *fe dihitung dengan mengalikan p(X) dengan banyak pelemparan (240) .

15 X²o = 351,04 5. Kesimpulan : Karena X²o > 9,488, maka Ho ditolak
X²o = 351,04 5.Kesimpulan : Karena X²o > 9,488, maka Ho ditolak. Artinya : distribusi frekwensi pengamatan tidak sesuai dengan distribusi frekwensi binomial. Banyaknya Sisi A (X) p (X) fo fe (fo – fe)² : fe 1 2 3 4 5 1/32 5/32 10/32 24 36 30 42 56 52 7,5 37,5 75 36,3 0,06 27 14,52 9,13 264,03 Jumlah 1,00 240 351,04 .

16 Soal: Data mengenai sisi angka (A) yang muncul dari pelemparan sebuah mata uang logam sebanyak 208 kali Dengan taraf nyata 5 % , ujilah apakah bentuk distribusi di atas mengikuti distribusi binomial yang berarti bahwa frekwensi pengamatan sesuai dengan frekwensi harapan ? Banyak Muka A 1 2 3 4 5 Frekwensi pengamatan 24 28 26 32 48 50 .

17 Pengujian Hipotesis Kehomogenan (Test of Homogenity)
.

18 Test of Homogenity (Pengujian Hipotesis Kehomogenan) Pengujian hipotesis Kehomogenan merupakan pengujian hipotesis apakah satu sampel dengan sampel lainnya memiliki persamaan (bersifat homogen)atau apakah dua sampel atau lebih berasal dari satu populasi atau tidak. Langkah langkah Pengujian : 1.Menentukan Formula hipotesis. Ho : dua sampel atau lebih bersifat homogen Hi : dua sampel atau lebih tidak bersifat homogen 2.Menentukan taraf nyata. Taraf nyata ditentukan dengan derajad bebas (db) =((b-1)(k-1) X²α(b-1)(k-1) = Menentukan kriteria pengujian. Ho diterima , jika X²o ≤ X²α (b-1)(k-1) Ho ditolak , jika X²o > X²α(b-1)(k-1) 4.Menentukan nilai uji statistik X²o = ∑ (fo – fe)² : fe) + (∑ (fo – fe)² : fe) fo=frekwensi pengamatan fe=frekwensi harapan 5.Kesimpulan. .

19 Contoh Soal: Dua sampel nilai diambil dari sebuah Universitas
Contoh Soal: Dua sampel nilai diambil dari sebuah Universitas.Sampel pertama memiliki 80 anggota dan sampel kedua memiliki 100 anggota. Diasumsikan bahwa kedua sampel nilai tersebut diambil dari nilai nilai ujian final statistik. Ujilah dengan taraf nyata 5 %, apakah kedua sampel nilai tersebut memiliki sifat homogen ? Data Sbb: Nilai Sampel 1 Sampel 2 Jumlah A B C D E 15 35 17 7 6 20 40 22 10 8 75 39 14 jUMLAH 80 100 180 .

20 Nilai Sampel 1 Sampel 2 (fo-fe)² :fe (fo-fe)² : fe fo fe A B C D E 15
Penyelesaian : 1.Formula Hipotesis. Ho :Kedua sampel nilai memiliki sifat homogen Hi :Kedua sampel nilai tidak memiliki sifat homogen 2.Taraf nyata : α = 5 % = 0,05 dengan db = (b-1)(k-1)=(5-1)(2-1)= k=2 (banyak sampel) b=5(banyak tingkatan nilai ) X² 0,05(4) = 9,488 3.Kriteria pengujian: Ho diterima , jika X²o ≤ 9, Ho ditolak , jika X²o > 9,488 4.Nilai Uji statistik X²o = 0, ,134 = 0,303 Nilai Sampel 1 Sampel 2 (fo-fe)² :fe (fo-fe)² : fe fo fe A B C D E 15 35 17 7 6 (35x80):180=15,6 (75x80):180=33,3 (39x80):180=17,3 (17x80):180=7,6 (14x80):180=6,2 20 40 22 10 8 (35x100):180=19,4 (75x100):180=41,7 (39x100):180=21,7 (17x100):180=9,4 (14x100):180=7,8 0,023 0,088 0,005 0,047 0,006 0,018 0,069 0,004 0,038 Jumlah 80 100 0,169 0,134 .

21 Kesimpulan : Karena X²o= 0,303 < 9,488 , maka Ho diterima
Kesimpulan : Karena X²o= 0,303 < 9,488 , maka Ho diterima. Jadi kedua sampel nilai tersebut memiliki sifat homogen, artinya kedua sampel berasal dari satu populasi. .

22 Soal: Dua sampel nilai diambil dari sebuah Universitas
Soal: Dua sampel nilai diambil dari sebuah Universitas.Sampel pertama memiliki 70 anggota dan sampel kedua memiliki 100 anggota. Diasumsikan bahwa kedua sampel nilai tersebut diambil dari nilai nilai ujian final statistik. Ujilah dengan taraf nyata 5 %, apakah kedua sampel nilai tersebut memiliki sifat homogen ? Data Sbb: Nilai Sampel 1 Sampel 2 A B C D E 12 30 7 9 22 41 19 6 .

23 Pengujian Hipotesis Satu Varian
Pengujian Hipotesis Satu Varian. Pengujian hipotesis satu varian merupakan pengujian hipotesis varian suatu populasi yang didasarkan pada varians sampelnya. Pengujian ini pada dasarnya sama dengan pengujian hipotesis satu rata rata atau satu proporsi Langkah langkah Pengujian: a.Menentukan Formula Hipotesis Ho :σ² = σ² Hi :σ² > σ² 2.Ho :σ² = σ² Hi : σ² < σ² 3.Ho : σ² = σ² Hi : σ² ǂ σ² b.Menentukan taraf Nyata. Taraf nyata dan nilai X² (tabel)ditentukan dengan derajat bebas db = n - 1 .

24 c. Menentukan kriteria pengujian 1
c.Menentukan kriteria pengujian 1.Ho diterima, jika X²o≤X²α(n-1) Ho ditolak , jika X²o >X²α(n-1) 2.Ho diterima, jika X²o ≥X²1-α(n-1) Ho ditolak , jika X²o <X²1-α(n-1) 3.Ho diterima, jika X²1-0,5 α(n-1) ≤X²o ≤X²0,5α(n-1) Ho ditolak , jika X²o>X²0,5(n-1) atau X²0 < X²1-0,5α(n-1) d.Menentukan nilai uji Statistik X² o = ( ( n-1)s²) : σ²o e.Membuat Kesimpulan. .

25 Contoh Soal. Perusahaan Lampu memproduksi lampu pijar
Contoh Soal. Perusahaan Lampu memproduksi lampu pijar. Dari data masa lalu diketahui bahwa simpangan baku ketahanan lampu tersebut adalah 75 jam. Dari sekian banyak yang diproduksi, diambil sampel sebanyak 25 buah dan diketahui simpangan baku ketahanannya 90 jam. Ujilah dengan taraf nyata 5 % , apakah produksi lampu pijar sekarang memiliki variasi ketahanan lebih besar daripada masa lalu ? Penyelesaian : a.Formula hipotesis. Ho :σ² = Hi :σ² > b.Taraf nyata : α = 5 % = 0,05 dan db= n-1 = 25-1= X²0,05(24) = 36,415 .

26 Soal : Direktur sebuah perusahaan Aki mobil mengatakan bahwa umur aki yang diproduksinya memiliki simpangan baku 0,9 tahun. Jika sebuah sampel random 10 aki menghasilkan simpangan baku 1,2 tahun, dengan taraf nyata 5%. Apakah menurut anda variasi simpangan baku dari sampel yang sekarang lebih besar dari yang terdahulu .

27 c. Kriteria pengujian Ho diterima , jika X²o ≤ 36
c.Kriteria pengujian Ho diterima , jika X²o ≤ Ho ditolak , jika X²o > d.Nilai uji Statistik. N=25 , S = S² = ; σ = σ² = X²o = (( 25 – 1) 8.100) : = 34,56 e.Kesimpulan Karena X²o = 34,56 < , maka Ho diterima . Artinya Variasi ketahanan lampu pijar produksi sekarang sama dengan variasi ketahanan lampu pijar produksi masa lalu. .

28 Tugas Akhir: * Sebuah Toko “Gondomayit” menjual roti sejenis dalam 3 bungkusan berbeda dengan harga yang sama.Hasil penjualan selama 4 bulan diperlihatkan dengan tabel : Dengan taraf nyata 1 %, ujilah apakah rata rata penjualan untuk tiap jenis bungkus sama ? BULAN BUNGKUS 1 BUNGKUS 2 BUNGKUS 3 I II III IV 95 89 91 85 90 94 98 101 96 93 .

29 Definition A goodness-of-fit test is used to test the hypothesis that an observed frequency distribution fits (or conforms to) some claimed distribution. . .

30 Key Concept In this section we consider sample data consisting of observed frequency counts arranged in a single row or column (called a one-way frequency table). We will use a hypothesis test for the claim that the observed frequency counts agree with some claimed distribution, so that there is a good fit of the observed data with the claimed distribution. . .

31 Goodness-of-Fit Test Notation
O represents the observed frequency of an outcome. E represents the expected frequency of an outcome. k represents the number of different categories or outcomes. n represents the total number of trials. . .

32 Requirements Goodness-of-Fit Test
The data have been randomly selected. The sample data consist of frequency counts for each of the different categories. For each category, the expected frequency is at least 5. (The expected frequency for a category is the frequency that would occur if the data actually have the distribution that is being claimed. There is no requirement that the observed frequency for each category must be at least 5.) . .

33 Goodness-of-Fit Test Statistic 2 =  (O – E)2 E . .

34 Goodness-of-Fit Critical Values
1. Found in Table A- 4 using k – 1 degrees of freedom, where k = number of categories. 2. Goodness-of-fit hypothesis tests are always right-tailed. . .

35 Goodness-of-Fit P-Values
P-values are typically provided by computer software, or a range of P-values can be found from Table A-4. . .

36 If all expected frequencies are equal:
the sum of all observed frequencies divided by the number of categories n E = k . .

37 If expected frequencies are not all equal:
Each expected frequency is found by multiplying the sum of all observed frequencies by the probability for the category. E = np . .

38 Goodness-of-Fit Test A close agreement between observed and expected values will lead to a small value of 2 and a large P-value. A large disagreement between observed and expected values will lead to a large value of 2 and a small P-value. A significantly large value of 2 will cause a rejection of the null hypothesis of no difference between the observed and the expected. . .

39 Goodness-of-Fit Test “If the P is low, the null must go.”
(If the P-value is small, reject the null hypothesis that the distribution is as claimed.) . .

40 Relationships Among the 2 Test Statistic, P-Value, and Goodness-of-Fit
. . Figure 11-2

41 Example: Data Set 1 in Appendix B includes weights from 40 randomly selected adult males and 40 randomly selected adult females. Those weights were obtained as part of the National Health Examination Survey. When obtaining weights of subjects, it is extremely important to actually weigh individuals instead of asking them to report their weights. By analyzing the last digits of weights, researchers can verify that weights were obtained through actual measurements instead of being reported. . .

42 Example: When people report weights, they typically round to a whole number, so reported weights tend to have many last digits consisting of 0. In contrast, if people are actually weighed with a scale having precision to the nearest 0.1 pound, the weights tend to have last digits that are uniformly distributed, with 0, 1, 2, … , 9 all occurring with roughly the same frequencies. Table 11-2 shows the frequency distribution of the last digits from 80 weights listed in Data Set 1 in Appendix B. . .

43 Example: (For example, the weight of lb has a last digit of 5, and this is one of the data values included in Table 11-2.) Test the claim that the sample is from a population of weights in which the last digits do not occur with the same frequency. Based on the results, what can we conclude about the procedure used to obtain the weights? . .

44 Example: . .

45 Example: Requirements are satisfied: randomly selected subjects, frequency counts, expected frequency is 8 (> 5) Step 1: at least one of the probabilities p0, p1,… p9, is different from the others Step 2: at least one of the probabilities are the same: p0 = p1 = p2 = p3 = p4 = p5 = p6 = p7 = p8 = p9 Step 3: null hypothesis contains equality H0: p0 = p1 = p2 = p3 = p4 = p5 = p6 = p7 = p8 = p9 H1: At least one probability is different . .

46 Example: Step 4: no significance specified, use  = 0.05
Step 5: testing whether a uniform distribution so use goodness-of-fit test: 2 Step 6: see the next slide for the computation of the 2 test statistic. The test statistic 2 = , using  = 0.05 and k – 1 = 9 degrees of freedom, the critical value is 2 = . .

47 Example: . .

48 Example: Step 7: Because the test statistic does not fall in the critical region, there is not sufficient evidence to reject the null hypothesis. . .

49 Example: Step 8: There is not sufficient evidence to support the claim that the last digits do not occur with the same relative frequency. This goodness-of-fit test suggests that the last digits provide a reasonably good fit with the claimed distribution of equally likely frequencies. Instead of asking the subjects how much they weigh, it appears that their weights were actually measured as they should have been. . .

50 Recap In this section we have discussed: Goodness-of-Fit
Equal Expected Frequencies Unequal Expected Frequencies Test the hypothesis that an observed frequency distribution fits (or conforms to) some claimed distribution. . .

51 Section 11-3 Contingency Tables
. .

52 Key Concept In this section we consider contingency tables (or two-way frequency tables), which include frequency counts for categorical data arranged in a table with a least two rows and at least two columns. We present a method for testing the claim that the row and column variables are independent of each other. We will use the same method for a test of homogeneity, whereby we test the claim that different populations have the same proportion of some characteristics. . .

53 Part 1: Basic Concepts of Testing for Independence
. .

54 Definition A contingency table (or two-way frequency table) is a table in which frequencies correspond to two variables. (One variable is used to categorize rows, and a second variable is used to categorize columns.) Contingency tables have at least two rows and at least two columns. . .

55 Definition Test of Independence
A test of independence tests the null hypothesis that in a contingency table, the row and column variables are independent. . .

56 Notation O represents the observed frequency in a cell of a contingency table. E represents the expected frequency in a cell, found by assuming that the row and column variables are independent r represents the number of rows in a contingency table (not including labels). c represents the number of columns in a contingency table (not including labels). . .

57 Requirements The sample data are randomly selected.
The sample data are represented as frequency counts in a two-way table. For every cell in the contingency table, the expected frequency E is at least 5. (There is no requirement that every observed frequency must be at least 5. Also, there is no requirement that the population must have a normal distribution or any other specific distribution.) . .

58 Null and Alternative Hypotheses
H0: The row and column variables are independent. H1: The row and column variables are dependent. . .

59 E = Test of Independence Test Statistic 2 =  (O – E)2 E
where O is the observed frequency in a cell and E is the expected frequency found by evaluating (row total) (column total) (grand total) E = . .

60 Test of Independence Critical Values
1. Found in Table A-4 using degrees of freedom = (r – 1)(c – 1) r is the number of rows and c is the number of columns 2. Tests of Independence are always right-tailed. . .

61 Test of Independence P-Values
P-values are typically provided by computer software, or a range of P-values can be found from Table A-4. . .

62 Test of Independence This procedure cannot be used to establish a direct cause-and-effect link between variables in question. Dependence means only there is a relationship between the two variables. . .

63 Expected Frequency for Contingency Tables
grand total row total column total (probability of a cell) n • p E = (row total) (column total) (grand total) . .

64 Example: Refer to Table 11-6 and find the expected frequency for the first cell, where the observed frequency is 88. The first cell lies in the first row (with a total frequency of 178) and the first column (with total frequency of 103). The “grand total” is the sum of all frequencies in the table, which is 207. The expected frequency of the first cell is . .

65 Example: (row total) (column total) E = (grand total) = (178)(103) 207 = We know that the first cell has an observed frequency of O = 88 and an expected frequency of E = We can interpret the expected value by stating that if we assume that getting an infection is independent of the treatment, then we expect to find that of the subjects would be given a placebo and would get an infection. There is a discrepancy between O = 88 and E = , and such discrepancies are key components of the test statistic. . .

66 Example: Common colds are typically caused by a rhinovirus. In a test of the effectiveness of echinacea, some test subjects were treated with echinacea extracted with 20% ethanol, some were treated with echinacea extracted with 60% ethanol, and others were given a placebo. All of the test subjects were then exposed to rhinovirus. Results are summarized in Table 11-6 (next slide). Use a 0.05 significance level to test the claim that getting an infection (cold) is independent of the treatment group. What does the result indicated about the effectiveness of echinacea as a treatment for colds? . .

67 Example: Requirements are satisfied: randomly assigned to treatment groups, frequency counts, expected frequencies are all at least 5 H0: Getting an infection is independent of the treatment H1: Getting an infection and the treatment are dependent . .

68 Example: Significance level is  = 0.05.
Contingency table: use 2 distribution The critical value of 2 = is found from Table A-4 with  = 0.05 in the right tail and the number of degrees of freedom given by (r – 1)(c – 1) = (2 – 1)(3 – 1) = 2. . .

69 Example: . .

70 Example: Because the test statistic does not fall within the critical region, we fail to reject the null hypothesis of independence between getting an infection and treatment. It appears that getting an infection is independent of the treatment group. This suggests that echinacea is not an effective treatment for colds. . .

71 Relationships Among Key Components in Test of Independence
Figure 11-6 . .

72 Part 2: Test of Homogeneity and the Fisher Exact Test
. .

73 Definition Test of Homogeneity
In a test of homogeneity, we test the claim that different populations have the same proportions of some characteristics. . .

74 How to Distinguish Between a Test of Homogeneity and a Test for Independence:
Were predetermined sample sizes used for different populations (test of homogeneity), or was one big sample drawn so both row and column totals were determined randomly (test of independence)? The key to identifying it is a test of homogeneity is the predetermined sample sizes. . .

75 Example: Does a pollster’s gender have an effect on poll responses by men? A U.S. News & World Report article about polls stated: “On sensitive issues, people tend to give ‘acceptable’ rather than honest responses; their answers may depend on the gender or race of the interviewer.” To support that claim, data were provided for an Eagleton Institute poll in which surveyed men were asked if they agreed with this statement: “Abortion is a private matter that should be left to the woman to decide without government intervention.” . .

76 Example: We will analyze the effect of gender on male survey subjects only. Table 11-8 is based on the responses of surveyed men. Assume that the survey was designed so that male interviewers were instructed to obtain 800 responses from male subjects, and female interviewers were instructed to obtain 400 responses from male subjects. Using a 0.05 significance level, test the claim that the proportions of agree/disagree responses are the same for the subjects interviewed by men and the subjects interviewed by women. . .

77 Example: . .

78 Example: Requirements are satisfied: data are random, frequency counts in a two-way table, expected frequencies are all at least 5 Test for homogeneity. H0: The proportions of agree/disagree responses are the same for the subjects interviewed by men and the subjects interviewed by women. H1: The proportions are different. . .

79 Example: Significance level is a = 0.05. This time we’ll use MINITAB.

80 Example: The Minitab display shows the expected frequencies of , , , and It also includes the test statistic of 2 = and the P-value of Using the P-value approach to hypothesis testing, we reject the null hypothesis of equal (homogeneous) proportions (because the P-value of is less than 0.05). There is sufficient evidence to warrant rejection of the claim that the proportions are the same. . .

81 Example: It appears that response and the gender of the interviewer are dependent. Although this statistical analysis cannot be used to justify any statement about causality, it does appear that men are influenced by the gender of the interviewer. . .

82 Fisher Exact Test The procedures for testing hypotheses with contingency tables with two rows and two columns (2  2) have the requirement that every cell must have an expected frequency of at least 5. This requirement is necessary for the 2 distribution to be a suitable approximation to the exact distribution of the test statistic. . .

83 Fisher Exact Test The Fisher exact test is often used for a 2  2 contingency table with one or more expected frequencies that are below 5. The Fisher exact test provides an exact P-value and does not require an approximation technique. Because the calculations are quite complex, it’s a good idea to use computer software when using the Fisher exact test. STATDISK and Minitab both have the ability to perform the Fisher exact test. . .

84 Recap In this section we have discussed:
Contingency tables where categorical data is arranged in a table with a least two rows and at least two columns. Test of Independence tests the claim that the row and column variables are independent of each other. Test of Homogeneity tests the claim that different populations have the same proportion of some characteristics. Fisher Exact Test . .

85 McNemar’s Test for Matched Pairs
Section 11-4 McNemar’s Test for Matched Pairs This section is optional; it can easily be omitted. . .

86 Key Concept The Contingency table procedures in Section 11-3 are based on independent data. For 2 x 2 tables consisting of frequency counts that result from matched pairs, we do not have independence, and for such cases, we can use McNemar’s test for matched pairs. . .

87 Key Concept In this section we present the method of using McNemar’s test for testing the null hypothesis that the frequencies from the discordant (different) categories occur in the same proportion. . .

88 Table 11-9 is a general table summarizing the frequency counts that result from matched pairs.

89 Definition McNemar’s Test uses frequency counts from matched pairs of nominal data from two categories to test the null hypothesis that for a 2  2 table such as Table 11-9, the frequencies b and c occur in the same proportion. . .

90 Notation a, b, c, and d represent the frequency counts from a 2  2 table consisting of frequency counts from matched pairs. (The total number of subjects is a + b + c + d.) . .

91 Requirements The sample data have been randomly selected.
The sample data consist of matched pairs of frequency counts. The data are at the nominal level of measurement, and each observation can be classified two ways: (1) According to the category distinguishing values with each matched pair, and (2) according to another category with two possible values. For tables such as Table 11-9, the frequencies are such that b + c ≥ 10. . .

92 Null and Alternative Hypotheses
H0: The proportions of the frequencies b and c (as in Table 11-9) are the same. H1: The proportions of the frequencies b and c (as in Table 11-9) are different. . .

93 Test Statistic Test Statistic (for testing the null hypothesis that for tables such as Table 11-9, the frequencies b and c occur in the same proportion): The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. where the frequencies of b and c are obtained from the 2  2 table with a format similar to Table 11-9. . .

94 Critical Values P-Values
The critical region is located in the right tail only. 2. The critical values are found in Table A-4 by using degrees of freedom = 1. P-Values The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. P-values are typically provided by computer software, or a range of P-values can be found from Table A-4. . .

95 Example: A randomized controlled trial was designed to test the effectiveness of hip protectors in preventing hip fractures in the elderly. Nursing home residents each wore protection on one hip, but not the other. Results are summarized in Table Using a 0.05 significance level, apply McNemar’s test to test the null hypothesis that the following two proportions are the same: The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

96 Example: The proportion of subjects with no hip fracture on the protected hip and a hip fracture on the unprotected hip. The proportion of subjects with a hip fracture on the protected hip and no hip fracture on the unprotected hip. The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. Based on the results, do the hip protectors appear to be effective in preventing hip fractures? . .

97 Example: Requirements are satisfied: randomly selected subject; matched pairs of frequency counts; nominal level of measurement, categorized according to two variables, one is “hip protector worn” or “not”, the other is “hip fractured” or “not”; b + c = = 25, which is at least 10 Data comes from matched pairs so use McNemar’s test: b = 10 and c = 15 The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

98 Example: Table A-4 with a 0.05 significance level and degrees of freedom = 1, right-tailed test: 2 = 3.841 The test statistic of 2 = does not exceed the critical value of 2 = 3.841, so fail to reject the null hypothesis. Note the P-value is 0.424, which is greater than 0.05, so reject the null. It appears that the proportion of hip fractures with the protectors worn is not significantly different from the proportion of hip fractures with- out the protectors worn. The hip protectors do not appear to be effective in preventing hip fractures. The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

99 Definition Discordant pairs of results come from matched pairs of results in which two categories are different (as in the frequencies b and c in Table 11-9). The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

100 Caution When applying McNemar’s test, be careful to use only the frequencies from the pairs of categories that are different. Do not blindly use the frequencies in the upper right and lower left corners, because they do not necessarily represent the discordant pairs. If Table were reconfigured as shown on the next slide, it would be inconsistent in its format, but it would be technically correct in summarizing the same results as Table 11-10; however, blind use of the frequencies of 0 and 309 would result in the wrong test statistic. The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

101 Caution The discordant pairs of frequencies are:
Hip fracture / No hip fracture: 15 No hip fracture / Hip fracture: 10 Still use 15 and 10 (not 0 and 309). The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

102 Caution In addition to comparing treatments given to matched pairs McNemar’s test is often used to test a null hypothesis of no change in before/after types of experiments. The test statistic chi-square values need to be compared with the chi-square critical value found in Table A-4. . .

103 Recap In this section we have discussed:
McNemar’s test for matched pairs. Data are place in a 2 x 2 table where each observation is classified in two ways. The test only compares categories that are different (discordant pairs). . .


Download ppt "Kuliah ke 14 Elementary Statistics Eleventh Edition"

Presentasi serupa


Iklan oleh Google