69
STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Embed Size (px)

Citation preview

Page 1: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

STATISTIK PENDIDIKANEDU5950

SEM1 2015-16

STATISTIK INFERENSI:

PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA

Rohani Ahmad Tarmizi - EDU5950 1

Page 2: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Chi – Square(x²)

Chi – Square (x²)

Page 3: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

ANALISIS “CHI-SQUARE”(KUASA-DUA KHI)

• Ini juga merupakan analisis hubungan tetapi lebih dikenali sebagai analisis perkaitan (association)

• Analisis ini digunakan pakai bagi menentukan perkaitan antara pasangan pembolehubah yang diukur pada skala nominal atau ordinal ataupun jika salah satunya dipadankan dengan data sela dan nisbah.

• Dengan itu pembolehubah seperti – Bangsa, – Jantina, – Suka/tidak suka makanan, – Tinggi pencapaian/rendah pencapaian, – Kebimbangan tinggi/ kebimbangan sederhana/ kebimbangan rendah

• Data frekuensi dicerap dengan membilang kejadian (occurance setiap perkara). Sesuai untuk kajian tinjauan

• Daripada frekuensi yang dicerap (observed frequency) analisis “chi-square” memberi kita makluman bahawa ada/tiada perkaitan antara kedua-dua pemboleh ubah.

Page 4: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

ANALISIS “CHI-SQUARE” (KUASA-DUA KHI)

• KATAKANLAH, penyelidik mengumpul maklumat tentang bangsa bagi responden dan juga kategori amalan pemakanan setiap responden,

• ATAU penyelidik tinjau pelajar dibeberapa buah sekolah dari segi jantina dan minta/tidak minat kepada aliran sains

• ATAU penyelidik tinjau bapa-bapa dan mengumpul maklumat tahap pendidikan (tinggi/ sederhana/ rendah) dan dikaitkan dengan kategori gaji

• Bagi ketiga-tiga contoh tersebut analisis yang sesuai dijalankan adalah analisis tak parametrik (analisis kuasa-dua khi)

• dan seterusnya dibina jadual kontingensi atau jadual“crosstabulation”.

• Daripada frekuensi yang dicerap (observed frequency) analisis “chi-square” memberi kita makluman bahawa ada/tiada perkaitan antara kedua-dua pemboleh ubah.

Page 5: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

ANALISIS “CHI-SQUARE”(KUASA-DUA KHI)

• Terdapat dua cara/kategori – CHI-SQUARE TEST OF GOODNESS OF FIT dan TEST OF INDEPENDENCE/DEPENDENCE

• TEST GOODNESS OF FIT – menjawab persoalan “adakah terdapat perbezaan kadar bagi sesuatu perkara/kejadian/persetujuan”

• TEST OF INDEPENDENCE/ DEPENDENCE – menjawab persoalan “adakah terdapat perkaitan/kebersandaran/ hubungan antara dua perkara

Page 6: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

ANALISIS “CHI-SQUARE”(KUASA-DUA KHI)

• Dapatan bagi analisis ini lazimnya dalam bentuk jadual frekuensi yang dipanggil jadual kontingensi atau jadual “crosstabulation”.

• Daripada frekuensi yang dicerap (observed frequency) analisis “chi-square” ini memberi kita makluman bahawa ada/tiada perkaitan yang signifikan antara kedua-dua pembolehubah yang dikaji

• Ataupun ada/tiada perbezaan frekuensi yang signifikan antara kategori-kategori yang dikaji.

Page 7: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

•Daripada jadual tersebut kita boleh telitikan atau kajikan sama ada terdapat hubungan atau perkaitan antara kedua-dua pemboleh ubah tersebut.

•Selanjutnya analisis pengujian hipotesis perlu dijalankan ia itu untuk menguji terdapatnya perkaitan antara kedua-dua pemboleh ubah tersebut dengan signifikan.

•Pengujian hipotesis ini adalah ujian kuasa dua khi.

•Sekiranya, terdapat perkaitan yang signifikan maka langkah seterusnya adalah dengan menentukan darjah atau magnitud hubungan tersebut.

Page 8: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

•Bagi analisis ini, data adalah dalam bentuk kekerapan dan sudah semestinya taburan skor adalah tidak normal.•Dengan itu taburan ini dipanggil taburan bebas (distribution-free).•Ujian ini juga dipanggil ujian tak parametrik oleh kerana ia tidak bertabur secara normal.•Sebagai “rule-of-thumb” penggunaan ujian parametrik digalakkan oleh kerana oleh kerana “power” atau kekuatannya, walaubagaimana pun jika data adalah dalam bentuk nominal serta juga terdapat taburan data yang tidak normal maka ujian tak parametrik diterima pakai.

•Ujian-ujian parametrik – sign test, Mann-Whitney U test, Wilcoxon matched-pairs signed ranks, Kruskal-Wallis, Chi-square.

Page 9: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

9

Different Scales, Different Measures of Association

Scale of Both Variables

Measures of Association

Interval or Ratio Scale Pearson r

Ordinal Scale Spearman’s rho

Nominal Scale Pearson Chi-Square (χ2 ) -Indicates there is significant association between two categorical variables

Measure of association is:

Phi coefficient

Contingency coefficient

Cramer’s V coefficient

Page 10: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Types of Chi-Square Test

1. Goodness-of-fit To test for certain assumption regarding one categorical variable

2. Test of Independence Test on association between variables regarding contingency tables

Page 11: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

The Chi-Square Distribution

♠ The Chi-Square distribution has only one parameter degrees of freedom

♠ The shape of the distribution curve is skewed to the right for small degrees of freedom and becomes symmetric for large degrees of freedom

♠ The entire Chi-square distribution lies to the right of the y-axis

♠ the Chi-square distribution assumes nonnegative values

Page 12: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

df = 2

df = 7

df = 12

The Chi – Squares Distribution

Page 13: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

x² Goodness - of - fit

Page 14: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

14

Steps in Test of Hypothesis –1. State the null and alternative hypothesis.

2. Determine the appropriate sampling distribution and the

critical value.

3. Calculate the test statistics - calculation based on:

O – Observed frequency

E – Expected frequency

Formula to calculate χ ² = ( O-E) ² / E

4. Make decision.

5. Conclusion.

Page 15: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Goodness-of-fit

♠ Test assumption for categorical variable

♠ Only one variable

♠ calculation based on:O – Observed frequencyE – Expected frequency

♠ Formula to calculate x²

x² = Σ ( O – E )² E

1

Page 16: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Hyp

oth

esis

Test

1State

HO and HA

2Determine the sampling

distribution and Critical Value

3Calculate x²

4Decision

5Conclusion

Based on: O and E

x² = Σ( O – E )² E

Page 17: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Step in testing Hypothesis

1. State the null and alternative hypothesesHO: Statement of assumptionHA: Statement opposite of the assumption

2. Calculate the best statistic

x² value

3. Determine critical value• α• df = k-1

4. Make your decision

5. Make conclusion

Criteria Decisionx² cal > x² critical Reject HO, Accept HA

x² cal ≤ x² critical Fail to Reject HO

Criteria DecisionSig- x² < α Reject HO, Accept HA

Sig- x² ≥ α Fail to Reject HO

Manual

SPSS

Page 18: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Example 1:

The following table displays the age distribution for a sample summoned for traffic violations. Test the hypothesis that the proportion of people summoned for traffic violations is different for all age groups at 0.05 level of significance.

Age <20 20-29 30-39 40-49 >49

Summon 32 25 19 16 8

Assumption:p1 = p2 = p3 = p4 = p5 = 0.20

Page 19: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Answer:

1. Hypotheses HO: The proportion of people involve in traffic violation is the same for all age groups HA: The proportion of people involve in traffic violation is not the same for all age groups

2. Test statistic

Age O E ( O – E ) ( O – E )² E

<20 32 20 12 144 7.20

20-29 25 20 5 25 1.25

30-39 19 20 -1 1 0.05

40-49 16 20 -4 16 0.80

>49 8 20 -12 144 7.20

100 16.50

( O – E )²

Page 20: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

3. Critical value df = k – 1 = 5 – 1 = 4

x² 4,0.05 = 9.49

4. Decision

Since x² cal (16.5) is bigger than x² critical (9.49) Reject HO, H Accept HA.

5. Conclusion: The proportion of people summoned for traffic violations is not

the same significantly for all age groups, x² (n=100) = 16.5, p < .05. This indicated that people of different age group differ significantly in frequency of traffic violation. Findings also indicated that the lower age group performed more traffic violations.

Fail to reject HO

RejectHO

α = 0.05

Page 21: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

SPSS Chi-Square output Age group involved in traffic offences

Observed N Expected N Residual

<20 32 20.0 12.0

20-29 25 20.0 5.0

30-39 19 20.0 -1.0

40-49 16 20.0 -4.0

>49 8 20.0 -12.0

Total 100

Test Statistics

Age group involvedIn traffic offences

Chi-Square 16.500df 4Asymp. Sig. 0.002

x² is valid if less than20% of the cells withExpected values < 5

Page 22: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Example 2:

In the 2008 poll, adults were asked, “Do you agree with the move to increase highway speed limit to 120 km/hour?” Results revealed that 58% said yes, 31% said no and 11% said do not know. Suppose the result hold true for the 2008.A recent poll produced the following distribution in response to the same question. Test the hypothesis that the current distribution of adult belonging to the three categories is different from that for 2008 at 0.01 level of significance.

Table 2

Category Yes No Do not know

Frequency 313 146 41

Prob.

Yes 0.58

No 0.31

Do not know 0.11 variable – agreement towards the move to increase highway speed limit to 120 km/hour

Page 23: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Answer

1. Hypotheses HO: The current percentage distribution of adults belonged to the three categories as that for 2008 HA: The current percentage distribution of adults do not belonged to the three categories from that for 2008

2. Test statistic

Opinion O E ( O – E ) ( O – E )² E

Yes 313 290 23 529 1.824

No 146 155 -9 81 0.523

Do not know 41 55 -14 196 3.564

500 5.911

( O – E )²

Page 24: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

3. Critical value df = k – 1 = 3 – 1 = 2

x² 2,0.01 = 9.21

4. Decision

Since x² cal (5.911) is smaller than x² critical (9.21) Fail to reject HO

5. Conclusion: The current percentage distribution of adults do belong to the

three categories as from that of 2008 at 0.01 level of significance, x² (2, n=500) = 5.911, p > .01. The current percentage is not different from the distribution in 2008. Therefore the agreement of adults in the current surveyIs similar to those in year 2008.

Fail to reject HO

RejectHO

α = 0.01

9.21

Page 25: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

SPSS Chi-Square output Perception

Observed N Expected N Residual

Agree 313 290.0 23.0

Disagree146 155.0 -9.0

Don’t know 41 55.0 -14.0

Total 500

Test Statistics

Perception

Chi-Square 5.910df 2Asymp. Sig. 0.052

a

a. 0 cells (0.0%) have expected frequencies less than 5. The minimum expected cell frequency is 55.0.

Page 26: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

x² Test of Independence

Page 27: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

27

Assumptions

• Chi Square test of independence-dependence is used when

two variables are measured on a nominal scale.

• Chi-square goodness-of-fit is used for test of differences

when you have only one variable.

• It can be applied to interval or ratio data that have been

categorized into a small number of groups.

• It assumes that the observations are randomly sampled

from the population.

Page 28: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Assumptions

• All observations are independent (an individual

can appear only once in a table and there are no

overlapping categories).

• It does not make any assumptions about the

shape of the distribution nor about the

homogeneity of variances

Page 29: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

29

Steps in Test of Hypothesis –1. State the null and alternative hypothesis.

2. Determine the appropriate sampling distribution and the

critical value.

3. Calculate the test statistics - calculation based on:

O – Observed frequency

E – Expected frequency

Formula to calculate χ ² = ( O-E) ² / E

4. Make decision.

5. Conclusion.

Page 30: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

30

The Hypothesis:Whether There is an Association or Not

• Ho : The two variables are independent

• Ha : The two variables are associated or dependent

Page 31: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

31

Calculating Test Statistics

• Contrasts observed frequencies in each cell of a contingency table with expected frequencies.

• The expected frequencies represent the number of cases that would be found in each cell if the null hypothesis were true ( i.e. the nominal variables are unrelated).

• Expected frequency of two unrelated events is product of the row and column frequency divided by total number of cases.

E or FE= Fr Fc / N

Page 32: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

32

Calculating Test Statistics

E

EO 22 )(

Page 33: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

33

Calculating Test Statistics

E

EO 22 )(

Observed

frequencies

Expe

cted

fre

quen

cy

Expected

frequency

Page 34: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

34

Determine Degrees of Freedom

df = (R-1)(C-1)

Num

ber of

levels in

column

variable

Num

ber of levels in row

variable

Page 35: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

35

Compare computed test statistic against a tabled/critical value

• The computed value of the Pearson chi- square statistic is compared with the critical value to determine if the computed value is improbable

• The critical tabled values are based on sampling distributions of the Pearson chi-square statistic

• If calculated 2 is greater than 2 table value, reject Ho

Page 36: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

36

Example

• Suppose a researcher is interested in voting preferences on environmental control issues.

• A questionnaire was developed and sent to a random sample of 90 voters.

• The researcher also collects information about the political party membership of the sample of 90 respondents.

Page 37: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

37

Bivariate Frequency Table or Contingency Table

AGREE (V1)/ TYPE OF VOTERS (V2)

Favor Neutral Oppose f row

Barisan 10 10 30 50

Pakatan 15 15 10 40

f column 25 25 40 n = 90

Page 38: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

38

Bivariate Frequency Table or Contingency Table

Favor Neutral Oppose f row

Barisan 10 10 30 50

Pakatan 15 15 10 40

f column 25 25 40 n = 90

Obser

ved

frequ

encie

s

Page 39: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

39

Bivariate Frequency Table or Contingency Table

Favor Neutral Oppose f row

Barisan 10 10 30 50

Pakatan 15 15 10 40

f column 25 25 40 n = 90

Row

frequency

Page 40: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

40

Bivariate Frequency Table or Contingency Table

Favor Neutral Oppose f row

Barisan 10 10 30 50

Pakatan 15 15 10 40

f column 25 25 40 n = 90Column frequency

Page 41: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

41

Determine The Hypothesis

Party Membership ( 2 levels) and Nominal Preference ( 3 levels) and Nominal

• Ho : There is no difference between B & P in their opinion on environmental control issue.

• Ha : There is difference between B & P in their opinion on environmental control issue.

• Ho: There is no association between responses to the environmental survey and the party membership in the population.

• Ha: There is association between responses to the environmental survey and the party membership in the population.

Page 42: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

42

Calculating Test Statistics

Favor Neutral Oppose f row

Barisan fo =10

fe =13.9

fo =10

fe =13.9

fo =30

fe=22.2

50

Pakatan fo =15

fe =11.1

fo =15

fe =11.1

fo =10

fe =17.8

40

f column 25 25 40 n = 90

Page 43: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

43

Calculating Test Statistics

Favor Neutral Oppose f row

Barisan fo =10

fe =13.9

fo =10

fe =13.9

fo =30

fe=22.2

50

Pakatan fo =15

fe =11.1

fo =15

fe =11.1

fo =10

fe =17.8

40

f column 25 25 40 n = 90

= 50*25/90

Page 44: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

44

Calculating Test Statistics

•fo = O

•fe = E

Favor Neutral Oppose f row

Barisan fo =10

fe =13.9

fo =10

fe =13.9

fo =30

fe=22.2

50

Pakatan fo =15

fe =11.1

fo =15

fe =11.1

fo =10

fe =17.8

40

f column 25 25 40 n = 90

= 40* 25/90

Page 45: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

45

Calculating Test Statistics

8.17

)8.1710(

11.11

)11.1115(

11.11

)11.1115(

2.22

)2.2230(

89.13

)89.1310(

89.13

)89.1310(

222

2222

= 11.03

Page 46: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

46

Determine Degrees of Freedom

df = (R-1)(C-1) =(2-1)(3-1) = 2

Page 47: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

3. Critical value df = 2

x² 2,0.05 = 5.99

4. Decision

Since x² cal (11.02) is bigger than x² critical (5.99) Reject HO

5.Conclusion: There is significant association between responses to the environmental survey and the party membership (Barisan or Pakatan) in

the population, x² ( 2,n=90) = 11.02, p < .05. ORThere is significant difference between the Barisan and Pakatan voters in

their opinion on environmental control issue, x² ( 2,n=90) = 11.02, p < .05.

Fail to reject HO

RejectHO

α = 0.05

Page 48: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

48

Compare computed test statistic against a tabled/critical value

• α = 0.05• df = 2• Critical tabled value = 5.991• Test statistic, 11.03, exceeds critical value• Null hypothesis is rejected• Barisan & Pakatan differ significantly in

their opinions on gun control issues

Page 49: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

49

Phi Coefficient• Pearson Chi-Square

provides information about the existence of relationship between 2 nominal variables, but not about the magnitude of the relationship

• Phi coefficient is the measure of the strength of the association

Symmetric Measures

-.050

.050

-.050

-.050

100

Phi

Cramer's V

Nominal byNominal

Pearson's RInterval by Interval

Spearman CorrelationOrdinal by Ordinal

N of Valid Cases

Value

Not assuming the null hypothesis.a.

Using the asymptotic standard error assuming the null hypothesis.b.

Based on normal approximation.c.

N

2

Page 50: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

50

Cramer’s V• When the table is larger

than 2 by 2, a different index must be used to measure the strength of the relationship between the variables. One such index is Cramer’s V.

• If Cramer’s V is large, it means that there is a tendency for particular categories of the first variable to be associated with particular categories of the second variable.

Symmetric Measures

-.050

.050

-.050 .100

-.050 .100

100

Phi

Cramer's V

Nominal byNominal

Pearson's RInterval by Interval

Spearman CorrelationOrdinal by Ordinal

N of Valid Cases

ValueAsymp.

Std. Error

Not assuming the null hypothesis.a.

Using the asymptotic standard error assuming the null hypothesis.b.

Based on normal approximation.c.

)1(

2

kNV

Total Number of

cases

Smallest of number of rows or

columns

Page 51: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

51

Contingency (C)

• When the table is larger than 2 by 3, a different index must be used to measure the strength of the relationship between the variables. One such index is C.

• If Contingency (C)is large, it means that there is a tendency for particular categories of the first variable to be associated with particular categories of the second variable.

Symmetric Measures

-.050

.050

-.050 .100

-.050 .100

100

Phi

Cramer's V

Nominal byNominal

Pearson's RInterval by Interval

Spearman CorrelationOrdinal by Ordinal

N of Valid Cases

ValueAsymp.

Std. Error

Not assuming the null hypothesis.a.

Using the asymptotic standard error assuming the null hypothesis.b.

Based on normal approximation.c.

nC

2

2

Page 52: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

52

SPSS Output for Gun Control Example

Chi-Square Tests

11.025a 2 .004

11.365 2 .003

8.722 1 .003

90

Pearson Chi-Square

Likelihood Ratio

Linear-by-LinearAssociation

N of Valid Cases

Value dfAsymp. Sig.

(2-sided)

0 cells (.0%) have expected count less than 5. Theminimum expected count is 11.11.

a.

Page 53: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Test of Independence

♠ Test the null hypothesis that the two variable are not related (independent) against the alternative hypothesis that the two variable are related (dependent)♠ Contingency table – two variables♠ Calculation based on:

O – Observed frequencyE – Expected frequency

E = RT x CT GT

♠ Formula to calculate x²

x² = Σ ( O – E )² E

2

Page 54: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

What to expect?H

yp

oth

esis

Test

1State

HO and HA

2Calculate

x² :

3Critical Value

4Decision

5Conclusion

Based on: O and E = np

x² = Σ( O – E )² E

Measure ofRelationship

• Phi• Contingency• Cramer’s V

Page 55: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Step in Testing Hypothesis:1. State the null and alternative hypotheses

HO: DV is independent of IVHA: DV is dependent on IV

2. Calculate the test statistic

x² Value

3. Determine critical value• α• df = (R-1)(C-1)

4. Make your decision

5. Make conclusion

Criteria Decision x² cal > x² criticalReject HO

x² cal ≤ x² critical Fail to Reject HO

Criteria DecisionSig- x² < α Reject HO

Sig- x² ≥ α Fail to Reject HO

Manual

SPSS

Page 56: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Example 1:

A study was conducted to test the relationship between student group (campus and PJJ) and academic performance. Data collected from a randomly selected sample follow.

1. Test the hypothesis on the relationship between the two variables at 0.01 level of significance.2. Calculate and describe an appropriate measure of association between the two variables.

Student Academic PerformanceGroup High Moderate Low

Campus 93 70 12

PJJ 87 32 6

Page 57: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Answer:

1. Hypotheses testing a. Hypotheses HO: Academic performance is independent of student group HA: Academic performance is dependent on student group

b. Test statistic Calculated expected value for each cell:

Student Academic Performance RowGroup High Moderate Low Totals

Campus 93 70 12 175

(105.0) (59.5) (10.5)

PJJ 87 32 6 125

(75.0) (42.5) (7.5)

Column Totals 180 102 18 300

Page 58: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Chi-Square:

Age O E ( O – E ) ( O – E )² E

C-H 93 105.0 -12 144 1.371

C-M 70 59.5 10.5 110.25 1.853

C-L 12 10.5 1.5 2.25 0.214

P-H 87 75.0 12 144 1.920

P-M 32 42.5 -10.5 110.25 2.594

P-L 6 7.5 -1.5 2.25 0.300

300 8.252

( O – E )²

Page 59: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

3. Critical value df = ( R – 1 )( C – 1 ) = ( 2 – 1 )( 3 – 1 ) = 1 x 2 = 2

x² 2,0.01 = 9.21

4. Decision Since x² cal (8.252) is smaller than x² critical (9.21) Fail to reject HO

5. Conclusion There is not enough evidence from the sample to conclude that the two variables, student groups and academic performance, are dependent at 0.01 level of significance.

Page 60: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

2. Measure of association for a 2 x 3 contingency table, both contingency and Cramer’s V coefficients are appropriate

x² x² + n

8.2528.252 + 300

0.164

x² n(k-1)

8.252300(2-1)

0.166

C =

C =

C =

√V =

V =

V =

Negligible association between student group and academic performance

Negligible association between student group and academic performance

Page 61: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

SPSS Chi-Square output

Performance is Statistics

High Moderate Low Total

Student Campus Count 93 70 12 175

Group Expected Count 105.5 59.5 10.5 175.0

PJJ Count 87 32 6 125

Expected Count 75.0 42.5 7.5 125.0

Total Count 180 102 18 300

Expected Count 180.0 102.0 18.0 300.0

Student group * Performance in Statistics Cross tabulation

Page 62: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Asymp. Sig.

Value df (2-sided)

Pearson Chi-Square 8.253 2 0.016

Likelihood Ratio 8.370 2 0.015

Linear-by-Linear

Association 3.762 1 0.009

N of Valid cases 300

Chi-Square Tests

a. 0 cells (0.0%) have expected count less than 5. the minimum expected count is 7.50

Value Approx. Sig.

Nominal by Phi 0.166 0.016

Nominal Cramer’s V 0.166 0.016

Contingency Coefficient 0.164 0.016

N of valid cases 300

Symmetric Measures

a. Not assuming the null hypothesisb. Using the asymptotic standard error assuming the null hypothesis

Page 63: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Example 3:

Dr Irwan is interested to test the relationship between gender and program ofstudy. Data taken from a randomly selected sample follow.

1. Test the hypothesis on the relationship at 0.01 level of significance.2. Calculate and describe an appropriate measure of association between the two variables.

Gender Program of Study

Science Social Science

Male 60 110

Female 75 55

Page 64: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Answer:

1. Hypotheses testing a. Hypotheses HO: Academic performance is independent of student group HA: Academic performance is dependent on student group

b. Test statistic Calculated expected value for each cell:

Gender Program of Study RowScience Social Science Totals

Male 60 110 170

(76.5) (93.5)

Female 75 55 130

(58.5) (71.5)

Column Totals 135 165 300

Page 65: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Chi-Square:

G-POS O E ( O – E ) ( O – E )² E

M_Sc 60 76.5 -16.5 272.25 3.559

M_SS 110 93.5 16.5 272.25 2.912

F_Sc 75 58.5 16.5 272.25 4.654

F_SS 55 71.5 -16.5 272.25 3.808

300 14.933

( O – E )²

Page 66: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

With Yate’s correction:

G-POS O E ( O – E ) (|O – E|-1/2 )² E

M_Sc 60 76.5 -16.5 256.0 3.346

M_SS 110 93.5 16.5 256.0 2.738

F_Sc 75 58.5 16.5 256.0 4.376

F_SS 55 71.5 -16.5 256.0 3.580

300 14.040

(|O – E|-1/2 )²

Page 67: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

3. Critical value df = ( R – 1 )( C – 1 ) = ( 2 – 1 )( 2 – 1 ) = 1 x 1 = 1

x² 1,0.01 = 6.63

4. Decision Since x² cal (14.040) is bigger than x² critical (6.63) Reject HO

5. Conclusion There is not strong evidence from the sample to conclude that the two variables, gender and program of study, are dependent at 0.01 level of significance.

Page 68: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

2. Measure of association For a 2 x 2 contingency table, phi coefficients is the most appropriate to be used

x² n

14.933 300

0.223

Ø =

Ø =

Ø =

Low association between gender and program of study

Page 69: STATISTIK PENDIDIKAN EDU5950 SEM1 2015-16 STATISTIK INFERENSI: PENGUJIAN HIPOTESIS BAGI ANALISIS KHI-KUASA DUA Rohani Ahmad Tarmizi - EDU5950 1

Chi-Square output

Performance is Statistics

Science Social Science Total

Gender Male Count 60 110 170

Expected Count 76.5 93.5 170.0

Female Count 75 55 130

Expected Count 58.5 72.5 130.0

Total Count 135 165 300

Expected Count 135.0 165.0 300.0

Gender * Program of Study Cross tabulation

Expected Values

Observed Values

Contingency Table, 2 x 2