Chisquare statistic - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

Chisquare statistic

Description:

Chi-square test for goodness of fit uses sample data to test hypotheses about ... Chi-square (X2) test for goodness of fit. X2 = S (fo fe)2 / fe , ... – PowerPoint PPT presentation

Number of Views:785
Avg rating:3.0/5.0
Slides: 44
Provided by: bayc
Category:

less

Transcript and Presenter's Notes

Title: Chisquare statistic


1
Chi-square statistic
  • Overview
  • Two types of statistics parametric and
    non-parametric
  • Parametric statistics are statistics that measure
    parameters of underlying distributions e.g., ?
    and ? of a normal distribution
  • Distribution free or non-parametric statistics
    are statistics that make few assumptions about
    the underlying population distribution

2
Chi-square statistic
  • Overview
  • This lecture will introduce the chi square
    statistic, a statistic that is used to analyze
    and interpret frequency data
  • Note unlike t tests and z scores, it is not
    assumed that there is an underlying numerical
    score ?
  • Each person contributes exactly one observation

3
Chi-square statistic
4
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Chi-square test for goodness of fit uses sample
    data to test hypotheses about the shape or
    proportions of a population distribution. The
    test determines how well the obtained sample
    proportions fit the population proportions
    specified by the null hypothesis

5
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Null hypothesis for chi square test states the
    proportion of the population in each category.
    This proportion is determined by the question
    that the investigator wishes to address

6
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Typical questions are that there is no preference
    across categories
  • E.g., brand x, brand y, brand z are equally
    preferred or preferred by 1/3 of the sample
  • Sample does not differ from comparison
    population.
  • E.g., Canadian sample does not differ from an
    American sample
  • E.g., distribution does not differ from
    theoretically obtained distribution of responses

7
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • data consist of observations from n individuals,
    each of whom contributes a single observation,
    and is classified into one category
  • Categories are mutually exclusive and exhaustive
  • E.g., suppose 40 seniors are identified as at
    risk for stroke or not at risk 10 of the seniors
    are at risk and 30 are not at risk

8
Chi-square statistic
9
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Observed frequency number of individuals from a
    sample that fall into a particular category
  • Note each individual is counted in one and only
    one category in other words the categories are
    mutually exclusive and exhaustive

10
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Expected frequency
  • In contrast to observed frequency, expected
    frequency refers to the expected frequency as
    determined from the null hypothesis
  • E.g., suppose the expected frequency, based on a
    national survey, was that 60 of the seniors
    should be at risk then in a sample of 40 seniors
    one would expect that 24 should be at risk (since
    .6 40 24), and 16 will not be at risk

11
Chi-square statistic
12
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Expected frequency frequency predicted from
    null hypothesis and sample size (n).
  • It can be determined by multiplying the
    proportion expected from the null hypothesis
    times the sample size n
  • fe p n, where fe is the expected frequency, p
    is the proportion, and n is the sample size

13
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • chi-square X2 S (fo fe)2 / fe ,
  • Where fo , fe are observed and expected
    frequencies
  • Note when the observed and expected frequencies
    are similar the chi square value should be small
    this will occur when the null hypothesis is true

14
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • chi-square X2 S (fo fe)2 / fe ,
  • Critical region found when chi square values are
    large
  • Chi square values larger when the number of
    categories is larger
  • different chi square distribution for different
    degrees of freedom (df)
  • df C 1, where C number of categories

15
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • chi-square X2 S (fo fe)2 / fe ,
  • null hypothesis is rejected when the obtained
    chi-square value is greater than that expected
    for a given alpha level, see Table B.8
  • E.g., suppose alpha .05 and df 5, recall df
    C 1, H0 is rejected if X2 11.07

16
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Applying chi-square statistic
  • Example.
  • Purpose to determine factors involved in course
    selection. Students must select one of the
    following alternatives
  • Interest in course topic
  • Ease of passing course
  • Instructor for course
  • Time of day of course

17
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Applying chi-square statistic
  • Example.
  • State hypothesis
  • H0 there is no preference for the four factors.
    Hence probability of selecting each factor is ¼
  • H1 the factors differ in preference
  • Set alpha level at .05
  • df C 1 3
  • Critical region chi-square 7.81

18
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Applying chi-square statistic
  • Example.
  • Determine expected frequency as shown in next
    table
  • Then compute X2

19
Chi-square statistic
20
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • X2 S (fo fe)2 / fe ,
  • (18 12.5)2/12.5 (17 12.5)2/12.5 (7
    12.5)2/12.5 (8 12.5)2/12.5
  • 8.08
  • Make decision
  • Reject H0 because chi square value is in critical
    region

21
Chi-square statistic
  • Chi-square (X2) test for goodness of fit
  • Reporting result APA style
  • As shown in Table X, students were more likely to
    endorse some factors than others in course
    selection. These differences in preference were
    statistically significant, X2 (3, n 50) 8.08,
    p lt .05.

22
Chi-square statistic
  • Chi-square (X2) test for independence
  • Chi-square statistic may also be used to test
    whether there is a relation between two variables
  • Here individual is measured on two variables that
    are categorical in nature
  • Data are presented in form of a table

23
Chi-square statistic
24
Chi-square statistic
  • Chi-square (X2) test for independence
  • Is there a relation between personality and
    colour preference?
  • What makes it hard to tell is that there are
    differences in sample size of the introverts and
    extroverts
  • 1 approach convert to proportions proportions
    should be similar

25
Chi-square statistic
  • Chi-square (X2) test for independence
  • Calculation involves comparing observed to
    expected frequencies

26
Chi-square statistic
27
Chi-square statistic
  • Chi-square (X2) test for independence
  • how would you describe in words the primary
    finding in this table?

28
Chi-square statistic
  • Chi-square (X2) test for independence
  • To calculate the expected frequency of a given
    cell, multiply the marginal row (fr ) and column
    (fc ) frequencies, and then divide by the total
    number of observations
  • fe fc fr / n

29
Chi-square statistic
30
Chi-square statistic
  • Chi-square (X2) test for independence
  • chi-square X2 S (fo fe)2 / fe
  • df (C-1) (R-1), where C column, R row
  • In a 2 X 4 matrix this means that there are 3 df
    because entering 3 values in the matrix allows
    one to fill in the remainder of the matrix, given
    knowledge of the marginal values

31
Chi-square statistic
32
Chi-square statistic
  • Choosing the right test
  • Suppose you want to investigate the relationship
    between self-esteem and academic children
  • The statistical test one employs depends upon the
    experimental design and the nature of the
    measures used

33
Chi-square statistic
  • Choosing the right test
  • Pearson correlation can be used if the two
    measures are interval or ratio, and each person
    is measured on both
  • Chi square can be used if two measures are
    categorized into a small number of categories,
    and each person is classified into one of the
    categories (e.g., academic performance, and self
    esteem divided into 3 categories)

34
Chi-square statistic
  • Choosing the right test
  • Independent measures t-test can be used if
    participants are divided into two groups (e.g.,
    high, low self esteem) and academic performance
    is measured

35
Chi-square statistic
  • Chi-square test of independence
  • Example.
  • Want to investigate relation between academic
    performance and self esteem. Test n 150
    children on self esteem and academic performance

36
Chi-square statistic
37
Chi-square statistic
  • Chi-square test of independence
  • State hypothesis (2 equivalent alternatives)
  • H0 there is no relationship between self esteem
    and academic performance (like correlation)
  • H0 the distribution of self esteem does not
    differ between low and high academic performers
    (like t-test)

38
Chi-square statistic
  • Chi-square test of independence
  • Calculate df
  • df (R-1) (C-1) (2-1) (3-1) 2
  • Determine critical value
  • df 2, alpha .05 X2 5.99

39
Chi-square statistic
  • Determine expected frequencies

40
Chi-square statistic
41
Chi-square statistic
42
Chi-square statistic
  • Compute X2
  • chi-square X2 S (fo fe)2 / fe
  • (17 12)2/12 (32 30)2/ 30
  • (34 27)2/27
  • 8.22
  • Make decision
  • X2 (2, n 150) 8.22, p lt .05, why?

43
Chi-square statistic
  • Chi-square test assumptions
  • Independence of observations
  • Expected frequencies
  • Should not be less than 5
Write a Comment
User Comments (0)
About PowerShow.com