chi-square and uji f

Upload: resharofifahutoro

Post on 04-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Chi-Square and uji F

    1/16

    Chi-square and F Distributions

    Children of the Normal

  • 8/13/2019 Chi-Square and uji F

    2/16

    Distributions

    There are many theoreticaldistributions, both continuous anddiscrete.

    We use 4 of these a lot: z (unit normal),t, chi-square, and F.

    Z and t are closely related to thesampling distribution of means; chi-square and F are closely related to thesampling distribution of variances.

  • 8/13/2019 Chi-Square and uji F

    3/16

    Chi-square Distribution (1)

    )(;)(;)(

    yzXzSD

    XXz

    2

    22 )(

    y

    z

    z score

    z score squared

    2)1(

    2 z Make it Greek

    What would its sampling distribution look like?

    Minimum value is zero.

    Maximum value is infinite.

    Most values are between zero and 1;

    most around zero.

  • 8/13/2019 Chi-Square and uji F

    4/16

    Chi-square (2)

    What if we took 2 values of z2at random and added them?

    2

    2

    22

    22

    2

    12

    1

    )(;

    )(

    yz

    yz 2

    2

    2

    12

    2

    2

    2

    2

    12

    )2(

    )()(zz

    yy

    Chi-square is the distribution of a sum of squares.

    Each squared deviation is taken from the unit normal:N(0,1). The shape of the chi-square distribution

    depends on the number of squared deviates that are

    added together.

    Same minimum and maximum as before, but now averageshould be a bit bigger.

  • 8/13/2019 Chi-Square and uji F

    5/16

    Chi-square 3

    The distribution of chi-square depends on1 parameter, its degrees of freedom (dfor

    v). As dfgets large, curve is less skewed,

    more normal.

  • 8/13/2019 Chi-Square and uji F

    6/16

    Chi-square (4)

    The expected value of chi-square is df.

    The mean of the chi-square distribution is its

    degrees of freedom.

    The expected variance of the distribution is2df.

    If the variance is 2df, the standard deviation must

    be sqrt(2df).

    There are tables of chi-square so you can find5 or 1 percent of the distribution.

    Chi-square is additive.2

    )(

    2

    )(

    2

    )( 2121 vvvv

  • 8/13/2019 Chi-Square and uji F

    7/16

    Distribution of Sample

    Variance

    1

    )( 22

    N

    yys

    Sample estimate of population variance

    (unbiased).

    2

    2

    2 )1(

    )1(

    sNN

    Multiply variance estimate by N-1 to

    get sum of squares. Divide bypopulation variance to normalize.

    Result is a random variable distributed

    as chi-square with (N-1) df.

    We can use info about the sampling distribution of the

    variance estimate to find confidence intervals and

    conduct statistical tests.

  • 8/13/2019 Chi-Square and uji F

    8/16

    Testing Exact Hypotheses

    about a Variance2

    0

    2

    0: H Test the null that the populationvariance has some specific value. Pick

    alpha and rejection region. Then:

    2

    0

    2

    2)1( )1(

    sNN

    Plug hypothesized populationvariance and sample variance into

    equation along with sample size we

    used to estimate variance. Compare

    to chi-square distribution.

  • 8/13/2019 Chi-Square and uji F

    9/16

    Example of Exact Test

    Test about variance of height of people in inches. Grab 30

    people at random and measure height.

    55.4;30

    .25.6:;25.6:

    2

    2

    1

    2

    0

    sN

    HH Note: 1 tailed test on

    small side. Set alpha=.01.

    11.2125.6

    )55.4)(29(229

    Mean is 29, so its on the small

    side. But for Q=.99, the value

    of chi-square is 14.257.

    Cannot reject null.

    55.4;30

    .25.6:;25.6:2

    2120

    sN

    HH

    Now chi-square with v=29 and Q=.995 is 13.121 and

    also with Q=.005 the result is 52.336. N. S. either way.

    Note: 2 tailed with alpha=.01.

  • 8/13/2019 Chi-Square and uji F

    10/16

    Confidence Intervals for the

    VarianceWe use to estimate . It can be shown that:2s 2

    95.)1()1(

    2)975;.1(

    22

    2)025;.1(

    2

    NN

    sNsNp

    Suppose N=15 and is 10. Then df=14 and for Q=.025

    the value is 26.12. For Q=.975 the value is 5.63.

    95.

    63.5

    )10)(14(

    12.26

    )10)(14( 2

    p

    95.87.2436.5 2 p

    2s

  • 8/13/2019 Chi-Square and uji F

    11/16

    Normality Assumption

    We assume normal distributions to figuresampling distributions and thus plevels.

    Violations of normality have minor

    implications for testing means, especially asN gets large.

    Violations of normality are more serious for

    testing variances. Look at your data before

    conducting this test. Can test for normality.

  • 8/13/2019 Chi-Square and uji F

    12/16

    The FDistribution (1)

    The F distribution is the ratio of two

    variance estimates:

    Also the ratio of two chi-squares, each

    divided by its degrees of freedom:

    2

    2

    2

    1

    2

    2

    2

    1

    .

    .

    est

    est

    s

    sF

    2

    2

    (

    1

    2

    )(

    /)

    /

    2

    1

    v

    v

    Fv

    v

    In our applications, v2will be larger

    than v1and v2will be larger than 2.In such a case, the mean of the F

    distribution (expected value) is

    v2/(v2-2).

  • 8/13/2019 Chi-Square and uji F

    13/16

    FDistribution (2)

    Fdepends on two parameters: v1andv2(df1and df2). The shape of Fchanges with these. Range is 0 to

    infinity. Shaped a bit like chi-square. Ftables show critical values for dfinthe numerator and dfin thedenominator.

    Ftables are 1-tailed; can figure 2-tailedif you need to (but you usually dont).

  • 8/13/2019 Chi-Square and uji F

    14/16

    Testing Hypotheses about 2

    Variances Suppose

    Note 1-tailed.

    We find

    Then df1=df2= 15, and

    22

    211

    22

    210 :;: HH

    7.1;16;8.5;16 2222

    11 sNsN

    41.37.1

    8.5

    22

    2

    1 s

    s

    F

    Going to the Ftable with 15

    and 15 df, we find that for alpha= .05 (1-tailed), the critical

    value is 2.40. Therefore the

    result is significant.

  • 8/13/2019 Chi-Square and uji F

    15/16

    A Look Ahead

    The Fdistribution is used in manystatistical tests

    Test for equality of variances.

    Tests for differences in means in ANOVA.

    Tests for regression models (slopes

    relating one continuous variable to another

    like SAT and GPA).

  • 8/13/2019 Chi-Square and uji F

    16/16

    Relations among Distributions

    the Children of the Normal Chi-square is drawn from the normal.

    N(0,1) deviates squared and summed.

    Fis the ratio of two chi-squares, each

    divided by its df. A chi-square dividedby its dfis a variance estimate, that is,a sum of squares divided by degrees offreedom.

    F= t2. If you square t, you get an Fwith 1 df in the numerator.

    ),1(

    2

    )( vv Ft