1 / 22

Chi - Square Analysis

Chi - Square Analysis. Chi - square. [1] When to use chi- square analysis? to explore frequency data i.e., the number of times something occurs [2] What does it do? compares our data with the probability we would expect by chance alone

cadee
Download Presentation

Chi - Square Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chi - Square Analysis

  2. Chi - square [1] When to use chi- square analysis? to explore frequency data i.e., the number of times something occurs [2] What does it do? compares our data with the probability we would expect by chance alone e.g., if we tossed a coin 6 times, we would expect to get 'Heads' on 3 occasions by chance alone

  3. Chi - square We can apply this logic to the frequencies we obtain from survey data Start with a simple example Let's assume that I own a small independent record store I want to get to know my customers (i.e., what they like)

  4. Chi - square I want to stock the right type of cds (i.e., ones that sell) In particular, I want to target my customer’s preferences What type of cd should I try and 'push'? ?

  5. Data from survey I take a sample of customers I sell a total of 202 cds over 2 days... ... which, in the face of competition from HMV and Amazon, I consider a triumph! I'm interested in whether men and women have different tastes in 2 types of music

  6. Hypotheses Q. Is there an association between gender and musical preference? Do men and women like different types of music? or, put another way, does choice of cd depend on the sex of the customer? The experimental hypothesis H1= There is an association between gender and musical preference The null hypothesis H0 =There is no association between gender and musical preference

  7. Hypotheses How can I test my hypothesis? Chi - square analysis can give me the answer It does this by comparing the preferences-by-gender I have noted (or ‘observed’ by recording who bought what) with the expected distribution of preferences by chance alone

  8. Data from survey Summary of sales data - produce 2 x 2 table - this gives us our observed frequencies (O) Note: I’ve got 2 categories of interest - gender and music Purchaser (gender) Male Female Purchases (music) Pop cd 56 34 Jazz cd 90 22

  9. Data from survey What might have I got by chance alone? All things being equal, I should have sold 101 cds to men, and 101 to women.... Plus, I should have sold 101 pop cds and 101 jazz cds.... And if things really were equally distributed, my 2 x 2 table might have looked liked this (i.e., approx 50 in each cell: Purchaser Male Female Purchases Pop cd 51 50 Jazz cd 50 51

  10. Data from survey The problem is, data typically aren’t that ‘neat’ This means that any data we obtain are likely to deviate from chance by some degree Purchaser Male Female Purchases Pop cd 56 34 Jazz cd 90 22 Looking at the table above, you can see that I’ve got unequal numbers of male/female customers, and I sell unequal numbers of pop/jazz cds. This makes it more difficult to see whether there is an association. What would my table look like if there wasn’t an association?

  11. Data from survey What if I simply sold more jazz cds than pop cds? The table might look like this: Purchaser Male Female Purchases Pop cd 56 16 Jazz cd 90 40 Then it wouldn’t matter what sex a customer was - they would probably be more likely to buy jazz than pop. In the table above also suggests that regardless of type of cd, more of my customers are male. Thus there doesn’t appear to be any noticeable association between my 2 categories here. But let’s go back to the original 2 x 2 table.....

  12. Data from survey A visual inspection of this table suggests my hypothesis might be correct. Look at the ‘direction’ of preference under the ‘male’ column heading. Jazz > pop.

  13. Data from survey Now look at the ‘direction’ of preference under ‘female’. Pop > jazz.

  14. Data from survey So, a visual inspection of this table suggests my hypothesis might be correct. A greater percentage of my male customers buy jazz, but a greater percentage of my female customers buy pop. Is this association between gender and type of cd statistically significant? Let’s begin by looking at the totals in each row and column

  15. Data from survey The row and column totals are vital to working out Chi-squared values - because we want to compare our ‘observed’ data (O) with those that would be expected by chance alone, we need to calculate the expected frequencies (E) This is easily done: for each of our 4 cells; Expected frequency = row total x column total ------------------------ grand total

  16. So, for the first cell in our 2 x 2 table (Male, Pop) we recorded 56 sales The expected no. of sales = 90 x 146/202 = 13140/202 = 65.05

  17. We then calculate the remaining 3 cells in exactly the same way F-P = 90 X 56/202 = 24.95 M-J = 112 X 146/202 = 80.95 F-J = 112 X 56/202 = 31.05

  18. Calculate Chi - square For each cell 2 = (O -E)2 E i.e., work out (O - E) then square this figure then divide by E

  19. Calculate Chi - square For each cell 2 = (O -E)2 E e.g., Male-Pop sales (O - E) = 56 - 65.05 = 9.05 9.052 = 81.9 81.9/65.05 = 1.26

  20. Calculate Chi - square Calculate for all 4 cells e.g., Male-Pop = 1.26 Female-Pop = 3.28 Male-Jazz = 1.01 Female-Jazz = 2.64  2 = 1.26 + 3.28 + 1.01 + 2.64 = 8.19

  21. Calculate Chi - square  2 = 1.26 + 3.28 + 1.01 + 2.64 = 8.19 From statistical tables: The critical (5%) value with 1 df = 3.84 Therefore, because our figure of2 = 8.19... ...then reject Null hypothesis (Also reject @ 1% level - p = 6.63!)

  22. Conclusion? There is an association between the sex of cd buyers, and the type of cds (pop versus jazz) they buy. The Chi-square value tells us that, if we collected the same type of data 100 times, we would expect to find the particular sales pattern (i.e., level of association between gender and music) we obtained by chance alone on fewer than one occasion. Specifically, the analysis has confirmed what we already suspected, that men are significantly more likely than women to walk out of my shop with a jazz cd than a pop cd, and women are more likely to buy pop.

More Related