applied statistical inference [modo de compa

Upload: noelia-eva-castillo-llica

Post on 03-Jun-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    1/89

    Hypothesis Testing

    Can you convert your data into meaningful information?

    o you know how to conduct experiments?

    - D r. O. -

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    2/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    3/89

    Population Sample

    Statistics

    Inference

    Parameters

    Presumption: belief dictated by probability

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    4/89

    IndependentRelatedIndependentRelated

    Intervaland

    Ratio

    Ordinal

    Nominal

    Two Samples N-SamplesSingle

    Sample

    Hypothesis Testing Map

    Eyes Color, Sex, Race

    Level Pain, Preference,.. #of Children,..{Integers}

    {Any Real #}

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    5/89

    :

    :

    1

    0

    :

    :

    1

    0

    ::

    1

    0

    Two-Tailed

    Test

    One-Tailed

    Test

    One-Tailed

    Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    6/89

    LetX1,, Xnbe alarge(e.g.,n 30) sample from a

    population with mean and standard deviation . To test a

    null hypothesis of the form

    H0: = 0

    H0: 0

    H0: 0

    Compute thez-score:

    If is unknown it may be approximated by .

    nz

    /

    0

    nSt

    /

    0

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    7/89

    H0:D= 3%H1:D 3%

    Single Sample CaseEXERCI SE #1

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    8/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    9/89

    n

    stn

    2

    0

    1

    H0: D= 3%

    H1: D 3% =0.494

    df = n-1

    =10-1= 9

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    10/89

    EXERCI SE #

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    11/89

    EXERCISE #

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    12/89

    df = 13

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    13/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    14/89

    Many studies have shown that direct eye contact and even patterns that look like eyes are

    avoided by many animals. Some insects, such as moths, have even evolved large eye-spot patterns on their wings to help ward off predators. This research example, modeled

    after Scaife's (1976) study, examines how eye-spot patterns affect the behavior of moth-

    eating birds.

    A sample ofn = 16 insectivorous birds is selected. The animals are tested in a box that

    has two separate chambers (see Figure). The birds are free to roam from one chamber to

    another through a doorway in a partition. On the wall of one chamber, two large eye-spotpatterns have been painted. The other chamber has plain walls. The birds are tested one

    at a time by placing them in the doorway in the center of the apparatus. Each animal is

    left in the box for 60 minutes, and the amount of time spent in the plain chamber is

    recorded. Suppose that the sample of n= 16 birds spent an average of = 35 minutes in

    the plain side with SS = 1215. Can we conclude that eye-spot patterns have an effect on

    behavior? Note that while it is possible to predict a value for, we have no information

    about the population standard deviation.

    EXE RCISE #4

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    15/89

    H0:D= 30

    H1:D 30

    97.5% confidence

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    16/89

    H0:D 30

    H1:D> 30

    95% confidence

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    17/89

    More Applications

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    18/89

    H0:D= 0

    H1:D 0

    Two Related Samples Case

    nSt D

    /

    Cluster Before After

    X2-X1

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    19/89

    Site X2X1

    nS

    Dt D

    /

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    20/89

    Site X2X1

    df=4

    -2.13

    0:H

    0:H

    1

    0

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    21/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    22/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    23/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    24/89

    Cluster Before

    H0:D 0H1:D< 0

    After

    The environmental policy must be well known across all the company levels. To certify

    ISO 14001 a company wide training effort has been made to make sure that every

    cluster in the company need less overtime dedication to this matter.

    Note that weested the

    mean = 0

    already

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    25/89

    H0:D 0

    H1:D< 0

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    26/89

    In-Class Work

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    27/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    28/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    29/89

    Compare the mean numbers of days

    spent in hibernation by hedgehogs in

    two areas of the country using

    randomly selected samples of each.

    Suppose 10 hedgehogs in each area are

    captured, radio-tagged and released.Their movements are monitored

    throughout the winter to determine the

    number of days when they did not

    leave their nests.

    Two Independent SamplesTest ( comparable)

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    30/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    31/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    32/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    33/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    34/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    35/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    36/89

    Two Independent Samples Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    37/89

    Two Independent Samples Test ( comparable)

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    38/89

    Two Independent Samples Test ( comparable)

    df =

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    39/89

    Exercise

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    40/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    41/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    42/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    43/89

    More Applications

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    44/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    45/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    46/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    47/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    48/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    49/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    50/89

    Goodness of fit test (Chi2 test)It is suggested that dispersal of seeds from the edge of a plantation of trees

    follows an inverse square law (i.e. the number of seeds travelling m is

    proportional to 1/x2). We want to test this theory using an isolated stand of

    trees on an area of moorland. Seeds will be collected in four 0.25 m2 plots at

    each of the five distances, on the downwind side of the plantation. The total

    numbers of seeds counted at each distance were:

    Using the equation (theoretical or empirical)0.04 0.0564

    X 294

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    51/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    52/89

    168.923

    If P-value (=0.05) >P-score; Then, H0is true

    If P-value (=0.05)

    P=score; Then, we have

    significant evidence that

    the results are not

    consistent w/H0 , so H1is true.

    One tailDist.

    Multiply by

    2

    =0.054

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    53/89

    If P-value (=0.05) >P-score; Then, H0is true

    If P-value (=0.05)

    P=score; Then, we have

    significant evidence that

    the results are not

    consistent w/H0 , so H1is true.

    7.814

    168.923

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    54/89

    Highschool College Graduate

    67 25 8

    Education

    A pool of 100 individual have been surveyed with respect to level of

    education (see table below). The population is expected to show the

    following trend: High school 60%, College degree 25%, and Master and PhD15%. Is the sample representative of the population?

    EXE RCISE #1

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    55/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    56/89

    Poor Average Rich

    A 8.19 -1.35 -6.84

    B -1.64 5.93 -4.29

    C -6.55 -4.58 11.13

    Reactant

    cata

    lyst

    Poor Average RichA 25 12 7 44

    B 6 12 2 20

    C 3 3 19 25

    34 27 28 89

    catalyst

    Reactant

    Poor Average Rich

    A 16.81 13.35 13.84 44

    B 7.64 6.07 6.29 20C 9.55 7.58 7.87 25

    34 27 28 89

    Reactant

    cata

    lyst

    Difference (O-E)

    Observed

    Expected

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    57/89

    Poor Average Rich

    A 3.99 0.14 3.38 7.51

    B 0.35 5.80 2.93 9.08

    C 4.49 2.77 15.76 23.03

    8.84 8.71 22.07 39.62

    Reactant

    catalyst

    Difference (O-E)2

    E

    If P-score> 0.05 Then,there is insufficient

    evidence to conclude that

    there is association

    between two factors

    If P-score 0.05 Then,

    there is significantevidence of an

    association between two

    factors.

    One tailDist.

    Multiply by

    2

    =1.03E-07

    62.3924

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    58/89

    Poor Average Rich

    A 3.99 0.14 3.38 7.51

    B 0.35 5.80 2.93 9.08

    C 4.49 2.77 15.76 23.03

    8.84 8.71 22.07 39.62

    Reactant

    catalyst

    Difference (O-E)2

    E

    If P-score> 0.05 Then,there is insufficient

    evidence to conclude that

    there is association

    between two factors

    If P-score 0.05 Then,

    there is significantevidence of an

    association between two

    factors.

    One tailDist.

    Multiply by

    2

    =1.03E-07

    62.3924

    9.487

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    59/89

    A scientist is concern that his new developed drug is affecting the proportion

    of sheep having stillborn lambs in his flock of sheep. He has records from

    before the drug was tested in the population so he is able to compare withcurrent data.

    EXE RCISE #1

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    60/89

    Compare the mean numbers of

    days spent in hibernation by

    hedgehogs in two areas of the

    country, using randomly

    selected samples of each.

    Suppose 10 hedgehogs in each

    area are captured, radio-tagged

    and released. Their movements

    are monitored throughout the

    winter to determine the number

    of days when they did not leave

    their nests

    Two Independent Samples Test ( check ifcomparable)

    33.344

    32.233

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    61/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    62/89

    12 2

    2

    12 2

    2

    These are one-tailedprobabilities, so we need to

    multiply them by 2.

    Therefore P= 96%

    4.0255

    1.034

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    63/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    64/89

    2

    2

    2

    11

    2

    2

    2

    10

    :H

    :H

    2

    2

    2

    11

    2

    2

    2

    10

    :H

    :H

    One-Tailed

    Test

    One-Tailed

    Test

    )1N,1N,( 21FFscore

    )1N,1N,1( 21FFscore

    The hypothesis that the two standard deviations are equal is rejected if

    1.034

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    65/89

    EXE RCI SE #1

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    66/89

    3.912

    1.34

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    67/89

    ANOVA Test

    A B C D

    x x x x

    x x x x

    x x x x

    x x x x

    x x x x

    ONE-FACTOR

    FLUX

    LEVELS

    REPLICATES

    SampleValues

    1 2 3

    A x,x,x,x x,x,x,x x,x,x

    B x,x,x,x x,x,x,x x,x,x

    C x,x,x,x x,x,x,x x,x,x

    D x,x,x,x x,x,x,x x,x,x

    LEVELS

    REAGENT

    LEVELS

    CATALYST

    One-Way ANOVA Two-Way ANOVA

    1 2 3 c 1 2 3 c 1 2 3 c

    1 x, x, x x, x, x x, x,x x, x,x x ,x, x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x x, x, x x, x, x2 x, x, x x, x, x x, x,x x, x,x x ,x, x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x x, x, x x, x, x

    3 x, x, x x, x, x x, x,x x, x,x x ,x, x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x x, x, x x, x, x

    a x, x, x x, x, x x, x,x x, x,x x ,x, x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x x, x, x x, x, x

    FACTORB

    FACTORC

    LEVELS

    1 2 b

    LEVELS

    FACTORC

    LEVELS

    FACTORA

    LEVELS

    FACTORC

    LEVELS

    Three-Way ANOVA

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    68/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    69/89

    One-Way ANOVA Test

    A B C D

    x x x x

    x x x x

    x x x x

    x x x x

    x x x x

    ONE-FACTOR

    FLUX

    LEVELS

    REPLICATES

    SampleValues

    ONE FACTOR

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    70/89

    One-Way ANOVA TestA B C Dx x x xx x x x

    x x x x

    x x x x

    x x x x

    ONE-FACTOR

    FLUX

    LEVELS

    REPLICATES

    SampleValues

    ONE-FACTOR

    FLUX

    LEVELS

    A B C

    REPLICATES

    SampleV

    alues 16 38 19

    13 21 14

    36 36 17

    29 39 15

    18 26 12

    22.4 32 15.4 23.267

    ONE FACTOR

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    71/89

    One-Way ANOVA TestA B C Dx x x xx x x x

    x x x x

    x x x x

    x x x x

    ONE-FACTOR

    FLUX

    LEVELS

    REPLICATES

    SampleValues

    5.098

    6.272

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    72/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    73/89

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    74/89

    Two-Way ANOVA Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    75/89

    Two-Way ANOVA Test

    20y

    i

    iB

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    76/89

    Two-Way ANOVA Test

    20y

    i

    iB

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    77/89

    Two-Way ANOVA Test

    20y

    i

    iB)05.0%(5

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    78/89

    Two-Way ANOVA Test

    20y

    i

    iB)05.0%(5

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    79/89

    Two-Way ANOVA Test

    Two Way ANOVA Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    80/89

    Two-Way ANOVA Test

    Two Way ANOVA Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    81/89

    Two-Way ANOVA Test

    T W ANOVA T t

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    82/89

    Two-Way ANOVA Test

    Th W ANOVA T t

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    83/89

    Three-Way ANOVA Test

    1 2 3 c 1 2 3 c 1 2 3 c

    1 x ,x ,x x ,x ,x x, x, x x, x, x x, x,x x, x,x x ,x ,x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x

    2 x ,x ,x x ,x ,x x, x, x x, x, x x, x,x x, x,x x ,x ,x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x

    3 x ,x ,x x ,x ,x x, x, x x, x, x x, x,x x, x,x x ,x ,x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x

    a x ,x ,x x ,x ,x x, x, x x, x, x x, x,x x, x,x x ,x ,x x ,x, x x ,x, x x ,x, x x ,x ,x x ,x ,x

    FACTORB

    FACTORC

    LEVELS

    1 2 b

    LEVELS

    FACTORC

    LEVELS

    FACTORA

    LEVELS

    FACTORC

    LEVELS

    Simplified Case

    Th W ANOVA T t

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    84/89

    Three-Way ANOVA Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    85/89

    Three-Way ANOVA Test

    Th W ANOVA T t

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    86/89

    Three-Way ANOVA Test

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    87/89

    Th W ANOVA T t

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    88/89

    Three-Way ANOVA Test

    Computed F > F(5%)

    Therefore, We reject Ho

    for AB, AC, and BC. In

    other words, these

    interactions do have animpact in the dependent

    variable.

  • 8/11/2019 Applied Statistical Inference [Modo de Compa

    89/89