testing two related means

Upload: sylvia-cheung

Post on 04-Feb-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/21/2019 Testing Two Related Means

    1/19

    Hypothesis Testing :Two Related Means

  • 7/21/2019 Testing Two Related Means

    2/19

    Comparing Two Related Means

    Before-after study :

    blood pressure of a patient before/after intake of a drug performance of staff before/after receiving training

    Name Before AfterA

    B

    C

    D

    E

    F

    210

    185

    215

    198

    187

    225

    196

    192

    204

    193

    181

    233

  • 7/21/2019 Testing Two Related Means

    3/19

    Comparing Two Related Means

    Repeated measure study :

    blood pressure of a patient measured several times in a day

    Name BloodPressure (am)

    BloodPressure (pm)

    A

    B

    C

    D

    :

    Y

    Z

    135

    136

    121

    121

    :

    116

    117

    126

    129

    124

    119

    :

    123

    120

  • 7/21/2019 Testing Two Related Means

    4/19

    Comparing Two Related Means

    Experiment with natural pairing :

    comparing the heights of husband and wife comparing the IQ of twins

    Pair Husband Wife

    1

    2

    3

    45

    6

    2.1

    1.8

    1.5

    1.61.8

    1.7

    1.9

    1.9

    1.4

    1.31.8

    2.3

  • 7/21/2019 Testing Two Related Means

    5/19

    Notations & Assumptions

    Pair 1st sample 2nd sample Difference

    1

    2

    :

    n

    X11X12:

    X1n

    X21X22:

    X2n

    D1 = X11 X21D2 = X12 X22

    :

    Dn = X1n X2n

    The two random samples come from normal populations

    The differences form a random sample from a

    normal population with mean and varianceD

    2

    D

  • 7/21/2019 Testing Two Related Means

    6/19

    Comparing Two Related Means

    n n

    i 1i 2i

    i 1 i 11 2

    D (X X )

    D X Xn n

    Hypotheses :

    H0: D H1: D (upper-tail test)

    H0: D =

    H1: D

    (two-tail test)

    D is estimated by D where

  • 7/21/2019 Testing Two Related Means

    7/19

    Paired Z Test

    Used when :

    populations normal

    D

    known

    Test statistic :

    D

    DZn

  • 7/21/2019 Testing Two Related Means

    8/19

    Paired t Test

    Used when :

    populations normal

    D

    unknown

    Test statistic :

    where

    which has a t distribution with (n-1) df

    D

    D

    tS n

    2

    1 ( )

    1

    n

    ii

    D

    D D

    Sn

  • 7/21/2019 Testing Two Related Means

    9/19

    User Old System (1) New System (2) DifferenceC.B. 9.98 s 9.88 s 0.10

    T.F. 9.88 9.86 0.02M.H. 9.84 9.75 0.09

    R.K. 9.99 9.80 0.19

    M.O. 9.94 9.87 0.07

    D.S. 9.84 9.84 0.00

    S.S. 9.86 9.87 - 0.01C.T. 10.12 9.98 0.14

    K.T. 9.90 9.83 0.07

    S.Z. 9.91 9.86 0.05

    Paired t Test : Example

    Is the new computer system faster at the 0.05 level ? You collect

    the processing times of 10 jobs, assumed coming from normalpopulations :

  • 7/21/2019 Testing Two Related Means

    10/19

    Paired t Test : Example

    Step 1: Define hypotheses

    (new system is not faster)

    (new system is faster)

    (continued)

    0

    1

    : 0

    : > 0

    D

    D

    H

    H

  • 7/21/2019 Testing Two Related Means

    11/19

    Paired t Test : Example

    Step 2: Determine the rejection region

    (continued)

    - Significance level is 0.05

    - Critical Value:

    - Reject H0 if

    8331.11-01,05.01, tt n

    8331.1t

    8331.1110,05.0 t

    RejectionRegion

  • 7/21/2019 Testing Two Related Means

    12/19

    Step 3: Compute test statistic

    Test Statistic

    Paired t Test : Example

    2

    0.072

    0.062151

    i

    i

    D

    DD

    n

    D DS

    n

    (continued)

    0 0.072 03.66

    0.06215 10D

    Dt

    S n

  • 7/21/2019 Testing Two Related Means

    13/19

    Paired t Test : Example (continued)

    Step 4: Make decision Since t = 3.66 is in

    the rejection region,

    we reject the nullhypothesis.

    There is sufficientevidence that the

    new system is fasterthan the existing

    system

    66.3t

    Rejectionregion

    8331.1110,05.0 t-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4

    Test Statistic 3.66 is in the Rejection Region

  • 7/21/2019 Testing Two Related Means

    14/19

    Paired tTest Using EXCEL

  • 7/21/2019 Testing Two Related Means

    15/19

    Paired tTest Using EXCEL

  • 7/21/2019 Testing Two Related Means

    16/19

    Paired tTest Using SPSS

  • 7/21/2019 Testing Two Related Means

    17/19

    Paired tTest Using SPSS

  • 7/21/2019 Testing Two Related Means

    18/19

    Paired tTest Using SPSS

  • 7/21/2019 Testing Two Related Means

    19/19

    Relation Between and

    22

    1

    2

    1 1 2 2

    12 2

    1 1 2 2 1 1 2 2

    1 1 1

    2 2

    1 2 12

    2 2

    1 2 1 2

    ( )

    1

    (( ) ( )) =

    1( ) ( ) ( )( )

    21 1 1

    2

    2

    n

    i

    D

    i

    n

    i i

    i

    n n n

    i i i i

    i i i

    D D

    S n

    X X X X

    n

    X X X X X X X X

    n n n

    S S S

    S S rS S

    1 2, ,DS S S r