1 / 23

Hypothesis test flow chart

Hypothesis test flow chart. χ 2 test for i ndependence (19.9) Table I. Test H 0 : r =0 (17.2) Table G . n umber of correlations. n umber of variables. f requency data. c orrelation (r). 1. 2. Measurement scale. 1. 2. b asic χ 2 test (19.5) Table I .

ama
Download Presentation

Hypothesis test flow chart

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. Hypothesis test flow chart χ2 test for independence (19.9) Table I Test H0: r=0 (17.2) Table G number of correlations number of variables frequency data correlation (r) 1 2 Measurement scale 1 2 basic χ2 test (19.5) Table I Test H0: r1= r2 (17.4) Tables H and A START HERE Means 2-way ANOVA Ch 21 Table E z -test (13.1) Table A More than 2 1 2 number of means Yes Do you know s? number of factors No 2 1 t -test (13.14) Table D 1-way ANOVA Ch 20 Table E independent samples? Yes No Test H0: m1= m2 (15.6) Table D Test H0: D=0 (16.4) Table D

  2. Chapter 20: Chi-Square (χ2 ) and Inference about Frequencies Note: we’re skipping sections 20.11 and 20.12 in the book (effect size and power) A Chi-Square Test (χ2) for Goodness of Fit tests hypotheses about the number of cases falling into the categories of a frequency distribution. A χ2 test is a hypothesis test on categorical data. Example: Research suggests that 13% of the population is left handed. Of the 91 students who took our survey, 7 indicated that they were left-handed. Are the numbers we observer for our class significantly different than what is expected from the population?

  3. The number χ2 (‘Chi-Square”) is a statistic that measures how close our observed frequencies (fo) are to the expected frequencies (fe). You can see that χ2 should increase with the discrepancy between the observed and expected frequencies.

  4. The shape of the χ2 distribution depends on the number of categories in the frequency distribution. For this example, there are two categories (‘left handed’ and ‘right handed’). Tables for χ2 are defined by their degrees of freedom (df). For examples like this, df = n-1, where n is the number of categories (not the number of measurements within or across each category). Table I provides critical values for χ2 for a given area in the tail and df. For this example, suppose we choose a = .05. Table I says that the critical value of χ2 for df = 1 and a = .05 is 3.84 Since our observed value of χ2 is 2.26, we fail to reject H0 and conclude that the frequency of left (or right) handers in our class is not significantly different than the population.

  5. What does the χ2 distribution look like? It varies a lot with df. Here’s what the χ2 distribution looks like for df = 1: Relative Frequency Pr(χ2>3.84) = .05 0 2 4 6 8 10 2 c

  6. Anyone notice that we already had a way of testing this hypothesis? We could have used the normal approximation to the binomial, with n= 91 and P = .13 We calculated that note that: It turns out that for two categories (df = 1) ,

  7. Something for the geeks out there… In general, a c2 distribution with k=df degrees of freedom is the probability distribution for drawing k scores from a standard normal distribution, squaring them, and adding them up.

  8. 12 10 8 Frequency 6 4 2 0 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Birthday Month Example: The birthdays of the 91 students in this class are distributed across the months as follows: Is this distribution of students significantly different than what would be expected if there was an equal probability of birthday for each month? (use a = .05) Here’s a plot of the frequency distribution of the data:

  9. Example: The birthdays of the 91 students in this class are distributed across the months as follows: Is this distribution of students significantly different than what would be expected if there was an equal probability of birthday for each month? (use a = .05) Answer: The null hypothesis (H0) is that there is even distribution of birthdays across the months. The alternative hypothesis HA is that the birthdays are not evenly distributed. Under H0, the expected number (fe) of students with birthdays for each month would be 91/12 = 7.58 Testing H0 requires a χ2 test with df = 12-1 = 11. Using Table I with a = .05 and df = 11, the critical value of χ2 is 19.68

  10. 2 c distribution with df = 11 Our observed value of χ2 (12.77) is less than the critical value of χ2 (19.68). Our decision is to fail to reject H0and conclude that the distribution of birthdays in this class is not significantly different from what is expected from an even distribution. Pr(χ2>19.68) = .05 Relative Frequency 0 5 10 15 20 25 30 2 c

  11. Another type of χ2 test is to test for independence between two variables. Example: For the students in this class that use either an Apple or a PC, the distribution of computer users across genders is as follows: Does this distribution show a significant dependence between gender and computer type? In other words, does the choice of computers differ significantly across genders? (Use a = .05)

  12. We can visualize our frequencies with a bar graph:

  13. To begin, we need to set up the expected frequencies under the null hypothesis (H0) that there is not a dependence of computer type on gender. This is done by computing the ‘marginal totals’ for each row and column. The expected frequency for each cell is the product of the cell’s row total and the cell’s column total, divided by the grand total:

  14. So our expected frequencies (fe) are: And (again) our observed frequencies (fo) are: The χ2 statistic is calculated as before by comparing fe to fo:

  15. The degrees of freedom is equal to (C-1) x (R-1), where C and R are the numbers of rows and columns of our matrix. For our example, C = 2, and R = 2 so df= (2-1) x (2-1) = 1 Recall from the first example that the value of χ2crit for df = 1 and a = .05 is 3.84 Our observed value of χ2 (1.53) is less than the critical value of χ2 (3.84). We therefore fail to reject H0 and conclude that there is not a significant dependence of computer choice on gender.

  16. Example: 94 students in our class responded to the question if they played video games ‘not at all’, ‘just a little’, ‘a fair amount’ and ‘very much’. The breakdown of the responses by gender is as follows: Is there a significant relationship between gender and amount of video game playing? Use a = .01. Answer: We will test the null hypothesis that video game playing and gender are independent.

  17. Video Game Playing

  18. Fill in the expected frequencies. For example, for ‘Female’ and ‘not at all’: (73)(28)/94 = 21.7

  19. df = (R-1)x(C-1) = (4-1)x(2-1) = 3 χ2crit for df= 3, and a = .01 is 11.35. Since our observed value of χ2is greater than χ2crit, we reject H0and conclude that the amount of video game playing does depend on gender.

  20. Use a χ2 test to determine if student’s favorite color depends on gender (use a = .01). (formally, test the null hypothesis that there is no relation between the color and gender) Favorite color Gender

  21. Favorite Color 20 15 Frequency 10 5 0 Female Male

  22. χ2obs= 20.39 χ2crit = 16.81 (df =6) We reject H0: There is a relation between gender and preferred color (p-value is .0024)

More Related