Successfully reported this slideshow.
Upcoming SlideShare
×

# Quantitative Methods for Lawyers - Class #12 - Chi Square Distribution and Chi Square Test - Professor Daniel Martin Katz

1,649 views

Published on

Quantitative Methods for Lawyers - Class #12 - Chi Square Distribution and Chi Square Test - Professor Daniel Martin Katz

Published in: Law, Health & Medicine, Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
• If we are speaking about saving time and money this site ⇒ www.WritePaper.info ⇐ is going to be the best option!! I personally used lots of times and remain highly satisfied.

Are you sure you want to  Yes  No
• D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1url.pw/TAGda ◀ ◀ ◀ ◀

Are you sure you want to  Yes  No

### Quantitative Methods for Lawyers - Class #12 - Chi Square Distribution and Chi Square Test - Professor Daniel Martin Katz

1. 1. Quantitative Methods for Lawyers Chi Square ( ) Distribution Class #12 χ 2 ( ad - bc)2 (a + b + c +d) ( a + b) (c +d) (b +d) ( a + c) Chi Square ( ) Testχ 2 @ computational computationallegalstudies.com professor daniel martin katz danielmartinkatz.com lexpredict.com slideshare.net/DanielKatz
2. 2. Generally - Two types of random variables numerical and categorical “What was your college major ?” or “Do you own a bike?” are categorical because they yield data such as “Economics” or “no.” Categorical versus Numerical Data categorical variables yield data in categories numerical variables yield data in numerical form Categorical variables “How tall are you?” or “What is your G.P.A.?” are numerical. Numerical data can be either discrete or continuous. Numerical variables
3. 3. A chi square (χ 2 ) statistic is used to investigate whether distributions of categorical variables differ from one another Chi Square ( ) Statisticχ 2 The Chi Square statistic compares the tallies or counts of categorical responses between two (or more) independent groups. (note: Chi square tests can only be used on actual numbers and not on percentages, proportions, means, etc.)
4. 4. There are several types of chi square tests depending on the way the data was collected and the hypothesis being tested. Imagine the simplest case of a 2 x 2 contingency table If we set the 2 x 2 table to the general notation shown below in Table 1, using the letters a, b, c, and d to denote the contents of the cells: Variable 2 Data Type 1 Data Type 2 Totals Category 1 a b a + b Category 2 c d c + d Total a + c b + d a+b+c+d =N Chi Square ( ) Statisticχ 2
5. 5. Variable 2 Data Type 1 Data Type 2 Totals Category 1 a b a + b Category 2 c d c + d Total a + c b + d a+b+c+d =N χ 2 = ( ad - bc)2 (a + b + c +d) ( a + b) (c +d) (b +d) ( a + c) Note: notice that the four components of the denominator are the four totals from the table columns and rows Chi Square ( ) Statisticχ 2
6. 6. Male Female Totals Not Research Asst 319 323 642 Research Assistant 60 34 94 Total 379 357 736 In Our Prior Class We Discussed Hypothesis Testing and that is the approach we would like to use here Chi Square is a technique to consider whether the observed gender disparity in RA positions is too large to be result of chance Chi Square ( ) Statisticχ 2
7. 7. Male Female Totals Not Research Asst 319 323 642 Research Assistant 60 34 94 Total 379 357 736 Ho is the Null Hypothesis H1 is the Alternative Hypothesis In this Case, Please Describe Each of these in simple words Chi Square ( ) Statisticχ 2
8. 8. Male Female Totals Not Research Asst 319 323 642 Research Assistant 60 34 94 Total 379 357 736 Ho: Gender Does Not Affect Probability of Being RA Chi Square ( ) Statisticχ 2
9. 9. Male Female Totals Not Research Asst 319 323 642 Research Assistant 60 34 94 Total 379 357 736 We need to understand the Expected Value for this question as it sets our baseline expectations Chi Square ( ) Statisticχ 2
10. 10. Male Female Totals Not Research Asst 319 323 642 Research Assistant 60 34 94 Total 379 357 736 Male Female Totals Not Research Asst 330.6 311.4 642 Research Assistant 48.4 45.6 94 Total 379 357 736 Chi Square ( ) Statisticχ 2 We need to understand the Expected Value for this question as it sets our baseline expectations
11. 11. Chi Square is all about comparing expected values to the observed/actual values Male Female Totals Not Research Asst 319 323 642 Research Assistant 60 34 94 Total 379 357 736 Male Female Totals Not Research Asst 330.6 311.4 642 Research Assistant 48.4 45.6 94 Total 379 357 736 Chi Square ( ) Statisticχ 2
12. 12. Male Female Not Research Asst 0.4 0.4 Research Assistant 2.8 3 Here is the Chi Square Calculation for the Student Population : = .4 + .4 + 2.8 + 3.0 = 6.6χ 2 Chi Square ( ) Statisticχ 2
13. 13. What Does a χ 2 value of 6.6 Tell Us? Need to Look at the P Value on Chi Square Table Here the Degrees of Freedom are = 1 (more on D.F. later) Thus, there is roughly a 1% probability that the disparity was generated by chance Chi Square ( ) Statisticχ 2
14. 14. Suppose you conducted a drug trial on a group and you hypothesize that the group receiving the drug would survive at a rate higher than those that did not receive the drug. Ho: Group survival is independent of drug treatment Ha: Group survival is associated with drug treatment Chi Square ( ) Statisticχ 2
15. 15. You conduct the study and collect the following data: χ 2 = ( ad - bc)2 (a + b + c +d) ( a + b) (c +d) (b +d) ( a + c) Chi Square ( ) Statisticχ 2
16. 16. Applying the formula above we get: Chi square = 105 [(36)(25) - (14)(30) ]2 / (50)(55)(39)(66) = 3.418 Chi Square ( ) Statisticχ 2
17. 17. How Do We Determine How Many Degrees of Freedom? Before we can proceed we need to know how many degrees of freedom we have. When a comparison is made between one sample and another, a simple rule is that the degrees of freedom equal (number of columns minus one) x (number of rows minus one) not counting the totals for rows or columns. For our data this gives (2-1) x (2-1) = 1. Chi Square ( ) Statisticχ 2
18. 18. We now have our chi square statistic (x2 = 3.418), our predetermined alpha level of signiﬁcance (0.05), and our degrees of freedom (df =1). Entering the Chi square distribution table with 1 degree of freedom and reading along the row we ﬁnd our value of x2 (3.418) lies between 2.706 and 3.841. Chi Square ( ) Statisticχ 2
19. 19. Male, Citizen Female, Citizen Male, Foreign Female, Foreign TOTAL Research Asst & Grant 12 9 7 9 37 Grant Only 32 62 22 44 160 Research Asst Only 33 11 8 5 57 No Grant & No Research Asst 199 112 66 105 482 TOTAL 276 194 103 163 736 Here We Have Additional Category - Foreign v. Citizen Suppose You Learn that School Offers Student Grant and that Professor Consider this Before Hiring Further Assume that Various Immigration Laws Make it more difﬁcult for foreign students to get RA positions
20. 20. Raw Data Expected Value Chi Square Calculation χ 2 = 41.2
21. 21. χ 2 = 41.2 How Many Degrees of Freedom? Rule of Thumb is Subtract 1 from # of Rows & Subtract 1 from # of Columns. Then, Multiply the Result (4 -1 ) x ( 4 - 1) = 9
22. 22. χ 2 = 41.2 How Many Degrees of Freedom? Rule of Thumb is Subtract 1 from # of Rows & Subtract 1 from # of Columns. Then, Multiply the Result (4 -1 ) x ( 4 - 1) = 9
23. 23. 41.2 > 27.88 χ 2 = 41.2 How Many Degrees of Freedom? Rule of Thumb is Subtract 1 from # of Rows & Subtract 1 from # of Columns. Then, Multiply the Result (4 -1 ) x ( 4 - 1) = 9
24. 24. http://sites.stat.psu.edu/~mga/401/tables/Chi-square-table.pdf Access the Chi Squared Table
25. 25. http://www.quantpsy.org/chisq/chisq.htm Calculating the Chi-Square Test
26. 26. Daniel Martin Katz @ computational computationallegalstudies.com lexpredict.com danielmartinkatz.com illinois tech - chicago kent college of law@