Your SlideShare is downloading. ×
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Chapter 07 Chi Square
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Chapter 07 Chi Square

1,349

Published on

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,349
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1.
    • Chapter 6
    • Chi-Square Test for Categorical Variable
  • 2. 6.1 Basic logic of  2 test
    • Given a set of observed frequency distribution
    • A 1 , A 2 , A 3 …
    • to test whether the data follow certain theory.
    • If the theory is true, then we will have a set
    • of theoretical frequency distribution:
    • T 1 , T 2 , T 3 …
    • Comparing A 1 , A 2 , A 3 … and T 1 , T 2 , T 3 …
    • If they are quite different, then the theory might not be true;
    • Otherwise, the theory is acceptable.
  • 3. 6.1.1 Chi-square distribution
    • ~  2 distribution
    • —— Agreement between observed and expected frequencies
    DF=k-1-# parameters estimating f i For a contingency table, DF=(# rows-1)(# columns-1 )
  • 4.  2 distribution
  • 5. 6.1.2 χ 2 Test for Goodness of Fit (Large Sample) Table1 Frequency distribution and goodness of fit based on 136 measurements to the phantom( 体模 ) intervals A Φ (X 1 ) Φ (X 2 ) P (X) T=n* P (X) (A-T) 2 /T 1.228- 2 0.00069 0.00466 0.00397 0.5405 3.94143 1.234- 2 0.00466 0.02275 0.01809 2.4601 0.08605 1.240- 7 0.02275 0.08076 0.05801 7.8889 0.10016 1.246- 17 0.08076 0.21186 0.13110 17.8294 0.03859 1.252- 25 0.21186 0.42074 0.20888 28.4083 0.40892 1.258- 37 0.42074 0.65542 0.23468 31.9167 0.80961 1.264- 25 0.65542 0.84134 0.18592 25.2855 0.00322 1.270- 16 0.84134 0.94520 0.10386 14.1244 0.24906 1.276- 4 0.94520 0.98610 0.04090 5.5618 0.43858 1.282- 1 0.98610 0.99744 0.01135 1.5434 0.19130 合 计 - - - - - 6.26692
  • 6.
    • 1. Setting up hypotheses
    • H 0 : the population follows N (1.26,0.01 2 )
    • H 1 : the population doesn’t follow N (1.26,0.01 2 ) α =0.05
    • Calculation of the statistic :
    • 3. P -value : ν = k -1-2=10-1-2=7
    • 4. Conclusion : With significance level α =0.05, H 0 is not rejected. The measurement follows the normal distribution.
  • 7.
    • 6.2 Comparison between Two Independent
    • Sample Proportions
    • In chapter 4 the Z test can only be used
    • for comparing  with a given  0 (one sample)
    • or comparing  1 with  2 (two samples).
    • If we need to compare more than two
    • samples, Chi-square test is widely used.
  • 8. Example 6.1
    • In a clinical survey, 215 patients with pulmonary heart disease ( 肺心病 ) in a hospital were collected , of which 164 patients have taken digitalis ( 洋地黄 ) and 51 patients haven’t taken it. Each of them received an ECG examination. The results are listed in Table 6.2.
  • 9.
  • 10.
  • 11. ν = 1
  • 12.  2 test and Z test
    • According to (4.25)
  • 13. Correction for continuity
    • When n ≥40, if there happens 1≤ e ij <5,
  • 14. Fisher’s exact test
    • When n <40, or e ij <1, with SPSS,  2 test is not proper then. An exact P value will be obtained for us to give conclusion.
    • This can be easily fulfilled in SPSS.
  • 15. Example 6.9
  • 16. Statistical description
  • 17. Statistical inference
  • 18. 6.3 The  2 Tests for Binary Variable under a Paired Design
    • Example 6.2 There are 260 serum ( 血清 ) samples. Each sample is divided into two and tested by two different methods of immunological test of rheumatoid factor( 类风湿因子 ) respectively. The results are listed in Table 6.4. Now the question is that results of two methods are independent or not.
  • 19. test for independence between two binary variables  2 =173.74 Example 6.2 12/80=15% 172/180=95%
  • 20. 6.3.2 Comparison between two sample proportions
    • McNemar test
     2 =
  • 21.
    • H 0 :  1 =  2 , H 1 :  1 ≠  2 , α =0.05
    • When H 0 is true,
    • For large sample (b+c>40)
    • If the  2 >  2 , then reject H 0
    0.05
  • 22. The Probability Expressions H 0 :  c1 =  r1 H 1 :  c1   r1 Since  c1 =  11 +  21,  r1 =  11 +  12 , This test becomes: H 0 :  12 =  21 , H 1 :  12   21 Trt A Trt B Total + - +  11 (a)  12 (b)  r1 -  21 (c)  22 (d)  r2 Total  c1  c2 1.0
  • 23. Correction to McNemar test ( f 12 + f 21 <40)  2 =  2 = =0.45
  • 24. 6.4 The  2 Test for R×C Contingency Table
  • 25. The statistic for hypothesis test  2 = =9.488
  • 26. 6.4.2 Multiple comparison for R×C Table control group + - I II III IV V … … … … … … … … … … VI … …
  • 27. 6.4.3 Measurement of association for R×C table
  • 28. Pearson contingency coefficient
  • 29.
    • Pre-requisite for  2 test
    • By experience,
    • The theoretical frequencies should be greater than 5 in more than 4/5 cells;
    • The theoretical frequency in any cell should be greater than 1.
    • Otherwise, we need to use Fisher exact test.

×