Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this document? Why not share!

Chi square hand out (1)






Total Views
Views on SlideShare
Embed Views



2 Embeds 33

http://cesium2012.blogspot.com 30
http://www.cesium2012.blogspot.com 3



Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Chi square hand out (1) Chi square hand out (1) Document Transcript

    • Chi-Square Test<br />What is chi-square testing?<br />
      • Identifies significant differences among the observed frequencies and the expected frequencies of a particular group
      • Attempts to identify whether any differences between the expected and observed frequencies are due to chance, or some other factor that is affecting it.
      • There are actually many types of Chi-square tests, but the most common one is the Pearson Chi-square Test.
      Terms and Definitions<br />
      • Categorical Data- 2 types
      • Numerical data- in form of numbers. (ex. 1,2,3,4)
      • Categorical data- comes in form of divisions. (ex. Yes or no)
      • Expected Frequencies
      • -values for parameters that are hypothesized to occur
      • -can be determined through:
      • 1) Hypothesizing that the frequencies are equal for each category.
      • 2) Hypothesizing the values on the basis of some prior knowledge.
      • 3) A mathematical method (see Page 3)
      Two applications of Pearson Chi-Square Test<br />
      • Chi-square test for Independence
      • -This tests whether the “category” from which the data comes from affects the data.
      • -May also be thought of as testing whether the categories in the experiment “prefer” certain kinds of data.
      • Example: Is there a difference in the car choices of male and females?
      • Chi-square test for goodness-of-fit
      • -This tests whether the observed data “fit” the expected data.
      • Example: Do the car sales this year match the car sales last year? (ie. Did we still sell around 50 blue cars? 25 red cars?)
      Requirements of the Chi-squared Test<br />1. The values of the parameters to be compared are quantitative and nominal.<br />2. There should be one or more categories in the setup.<br />3. The observations should be independent of each other.<br />4. An adequate sample size. (At least 10)<br />5. Most of the time, it is the frequency of the observations that are used.<br />Example<br />A student wants to see whether the food preferences of males and females differed. He tried to see whether males or females had a general difference in the preference for cooked and raw foods. A survey was conducted with the following results:<br />Twelve males preferred Cooked foods.<br />Eight males preferred Raw foods.<br />Five females preferred Cooked foods.<br />Five females preferred Caw foods.<br />Step 1: State the null hypothesis and the alternative hypothesis.<br />Ho: There is no significant difference between the food preferences of males and females.<br />Or<br />Food preference is independent of gender.<br /> <br />Ha: There is a significant difference between the food preferences of males and females.<br />Or<br />Food preference is affected by gender.<br />Step 2: State the level of significance. (Fish Thingy)<br />α = 0.05<br />0.05 is the level of significance for most scientific experiments.<br />Step 3: Set up a contingency table:<br />The contingency table summarizes the data.<br />The categories on the columns are the “preferences” that you are checking. <br />The categories on the rows are the “populations” whose preferences are being checked. A row total and column total is always included as well.<br />Preference Male Female Total (Row) Cooked 12 5 17 Raw 8 5 13 Total (Column) 20 10 30 <br />Step 4: Compute for the expected frequencies.<br />The chi-square test for independence usually uses the third method of getting expected frequencies.<br />Expected Frequency = (Row Total)(Column Total)<br />Grand total<br />This expected frequency is computed for EACH cell.<br />Preference Male Female Total (Row) Cooked (20)(17)/30 = 11.33 (10)(17)/30 = 5.67 17 Raw (13)(20)/30 = 8.67 (13)(10)/30 = 4.33 13 Total (Column) 20 10 30 <br />The fundamental formula for the Chi-squared test is:<br />-114300118110 <br />Where O is the observed frequencies<br />E is the expected frequencies<br />And x2 is the chi-square value<br />Step 5: Rearrange the table to show the observed and expected frequencies on the columns, and the subcategories on the rows.<br />Preference Observed Expected Chi-square Cooked Males 12 11.33 0.0396 Cooked Females 5 5.67 0.0792 Raw Males 8 8.67 0.0518 Raw Females 5 4.33 0.1037 Total 0.2743 <br />Step 6: Determine the degrees of freedom<br />The degrees of freedom is: df = (Rows – 1)(Columns – 1)<br />df = (2 – 1)(2 – 1) = 1<br />Step 7: Check the tabular Chi-squared value with your df and level of significance.<br />Checking the table, we see that the tabular chi-squared value for df = 1, and α = 0.05 is 3.841.<br />Since our calculated chi-square is less than this, the conclusion is to accept the null hypothesis. Hence, food preference is independent of gender.<br />If it were greater, we would reject the null hypothesis.<br />