9 testing the differences

Upload: ronald-cario-seguin

Post on 02-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 9 Testing the Differences

    1/10

  • 8/11/2019 9 Testing the Differences

    2/10

    3 !he assumptions used to test the difference are#

    !he samples must be independent of each other4 meaning there must be no relationship

    between the sub5ects in each sample

    !he populations from which the samples were obtained must be normally distributed, the

    standard deviations of the variable must be nown, or the sample sie must be e6ual to orgreater than 0+. "erein lies the definition of large samples.

    7 hen the foregoing conditions are met, the *test is used in which the test value is obtained

    using#( ) ( )

    2

    2

    2

    1

    2

    1

    2121

    n

    s

    n

    s

    XXz

    +

    =

    here#

    1X , 2X % sample means

    $1,$ % population means

    hen the null hypothesis is $1 % $ then $1 * $ % +

    s1, s % sample standard deviations

    n1 , n% sample sies

    8

    9xample

    In a survey it was found that the average wages for construction laborers in :ity A is ;hp

    73.7

  • 8/11/2019 9 Testing the Differences

    3/10

    ( ) ( )

    50

    )49.14(

    50

    )86.16(

    083.24126.265

    22

    +

    =z

    % 8.23 test value

    Decide on whether to accept or re5ect the null hypothesis!he test value % 8.23 does exceeds :.C. % B1.73

    Inasmuch as the test value is in the re5ection region, the null hypothesis must be

    re5ected (while the alternative hypothesis is accepted)

    ?ummarie the results

    !here is enough evidence to support the claim that the means are not e6ual and that

    there is a significant difference between the rates of laborers in :ity A and :ity '

    =

    !he confidence interval between two means can also be found. hen hypothesiing that thedifference between two means is ero ($1* $ % +), and the confidence interval actually contains

    ero, then the null hypothesis is accepted. Etherwise it is re5ected.

    >

    !he confidence interval for the difference between two means is given by#

    2

    2

    2

    1

    2

    1

    221 )(

    nnzXX

    + /( $1*$) /2

    2

    2

    1

    2

    1

    221 )(

    nnzXX

    ++

    ote that sample standard deviationscan be used in place of when n 30

    1+

    9xample

    Find the >3G confidence interval for the difference of the two means in the example in item H 7

    ?olution#

    >3 G % +.>3

    (+.>3) % +.283

    In the standard normal distribution table (*distribution), locate a value nearest to +.283 then

    find the corresponding *value.

    !he value +.283+ is found at the intersection of the row 1.> and column +.+7.

    !hus, @ B +.+7

    % 1.>7

    From Item H 7

    1X % 73.7

    2X % 21.=0

    s1 % 17.=7

    s % 12.2>

    n1 % 3+n % 3+

    Jsing2

    2

    2

    1

    2

    1

    221 )(

    nnzXX

    + / ($1*$)/2

    2

    2

    1

    2

    1

    221 )(

    nnzXX

    ++

  • 8/11/2019 9 Testing the Differences

    4/10

    50

    )49.14(

    50

    )86.16(96.1)83.24126.265(

    22

    +

    /($1*$) /50

    )49.14(

    50

    )86.16(96.1)83.24126.265(

    22

    ++

    18.7 /($1*$)/0.20 confidence interval

    ote that since the confidence interval does not contain +, then the null hypothesis must be

    re5ected which is the same conclusion in item H 7

    Differences in Variances and Standard Deviations

    11 Differences in variances and standard deviations are determined using the F-test

    1 If two independent samples are selected from two normally distributed populations in which the

    population variances are e6ual and if the sample variances s1K and sK are compares as s1K< sK,

    the sampling distribution of the variance results in the F*distribution.

    10

    :haracteristics of the F*distribution#

    !he values of F cannot be negative because variances are always positive

    !he distribution is positively sewed

    !he mean of F is approximately e6ual to 1

    !he distribution is a family of curves based on the degrees of freedom of the variance of the

    numerator and the degrees of freedom of the variance of the denominator

    12 !he expression for the F*test is given by#2

    2

    2

    1

    s

    sF =

    here s1 is the larger of the two variances. !he sample from which this larger variance isobtained has a sample sie also designated as n1.

    !here are also two degrees of freedom# n1*1 % d.f.. (numerator)and n*1 % d.f.D. (denominator)

    13 !he F*distribution table depends on the @ value. !his means that each @ value has its own F*

    distribution table.

    For a right*tailed and left*tailed test, identify the table corresponding to the @ value4

    For a two*tailed test, identify the table corresponding to @

  • 8/11/2019 9 Testing the Differences

    5/10

    d.f.D. % n*1 % 1=*1 % 18

    ?ince this is a two*tailed test, use @

  • 8/11/2019 9 Testing the Differences

    6/10

    ( ) ( )

    2

    2

    2

    1

    2

    1

    2121

    n

    s

    n

    s

    XXt

    +

    =

    Degrees of freedom are e6ual to the smaller of n1-1 or n2-1

    9xample

    A researcher wants to determine whether the salaries civil engineers employed by 'ritish firms

    are higher than those employed by Arabian owned firms. ?ample salaries of civil engineers from

    both types of firms were obtained from which the means and standard deviations of their

    salaries were computed, as follows#

    At a significance level of +.+1, can it be concluded that civil engineers in 'ritish firms receive

    more than those in Arabian companiesN

    ?olution#

    First determine whether the variances can be considered e6ual using the F test

    ?tate the hypothesis and identify the claim

    "o# L1K * LK % + (claim)

    "1# L1K * LK & +

    Find the critical value(s)

    @ % +.+1

    !he standard deviation of 7++ is bigger that 23+ so that the former is s1while the latter is

    s. From which,

    s1% 7++, n1% 1+, s% 23+, n% =,

    d.f.. % n1*1 % 1+*1 % >

    d.f.D. % n*1 % =*1 % 8

    For a two*tailed test, use @

  • 8/11/2019 9 Testing the Differences

    7/10

    !he test value does not fall within the re5ection region4

    Accept the null hypothesis ( and re5ect the alternative hypothesis )

    ?ummarie the results

    !here is enough evidence to support the claim that the variances of the salaries of civil

    engineers employed by 'ritish and Arabian firms are e6ual

    ?ince the sample sies are small, use the t test for the determining whether there is a difference

    in means.

    ?tate the hypothesis and identify the claim

    "o# $1 $"1# $1- $ (claim)

    Find the critical value(s)

    @ % +.+1

    ?ince the variances are e6ual, use d.f. % n1Bn*

    d.f. % 1+ B = *

    % 17

    From the t*distribution table,

    :.C. % B .3=0

    Determine the test value using( ) ( )

    ( ) ( )

    2121

    2

    22

    2

    11

    2121

    11

    2

    11

    nnnn

    snsn

    XXt

    +

    +

    +

    =

    1X % 7=++

    2X % 32++

    $1 * $ % + (since there is no specificied difference between the means)

    s1 % 7++

    s % 23+

    n1 % 1+

    n % =

    ( ) ( )

    ( ) ( )8

    1

    10

    1

    2810

    )450(18)600(110

    02540026800

    22

    +

    +

    +

    =t

    t % 3.28, test value

    Decide on whether to accept or re5ect the null hypothesis

    !he test value t % 3.28 exceeds :.C. % .3=0 which means the test value is in the re5ection

    region.

    Inasmuch as the test value is in the re5ection region, the null hypothesis must be re5ected

    (while the alternative hypothesis is accepted)

    ?ummarie the results

    !here is enough evidence to support the claim that the salaries of civil engineers

    employed by 'ritish firms are higher than that paid by Arabian firms.

  • 8/11/2019 9 Testing the Differences

    8/10

    0

    !he :onfidence Interval for the difference of two means when samples are small and

    independent can also be determined as follows#

    When variances are E!"#

    ( ) ( )

    2121

    2

    22

    2

    11

    221

    11

    2

    11)(

    nnnn

    snsntXX +

    +

    +

    / ($1*$)/( ) ( )

    2121

    2

    22

    2

    11

    221

    11

    2

    11)(

    nnnn

    snsntXX +

    +

    ++

    When variances are $%& E!"#

    2

    22

    1

    21

    221 )(

    n

    s

    n

    stXX +

    / ($1*$)/2

    22

    1

    21

    221 )(

    n

    s

    n

    stXX ++

    Small Dependent Samples

    2

    Dependent samples are those that are related. For instance to test the effect of a certain drug on

    vision, the sub5ects are pretested (sub5ect are tested '9FEM9 applying the drug). Data is gathered

    from this sample. !hen, the drug is applied, after which the sub5ects are tested and data are

    obtained. ?ince the sub5ects are the same, the samples (two samples, one with no drug while theother receives the drug) are related. In cases such as these, the pretest will have an influence on

    the results of the posttest (test administered AF!9M treatment or application of whatever is being

    determined). !his must therefore be taen into account.

    ?amples can also be dependent when the sub5ects are matched. For instance, to study the

    effectiveness of learning by computers as compared to traditional lecture*discussion method, it

    may be that students are paired. !hose with the same IQs are paired together, and afterward

    each student is assigned to two different sample groups one student for computer instruction

    and the other under the group taught by traditional method. 9vidently, the two sample groups

    are related and are thus dependent.

    3

    A special t test for dependent means is used in which the hypotheses are#

    For a two-tailed test#

    "o# $D% +"1# $D& +

    For a right-tailed test#

    "o# $D +"1# $D - +

    For a left-tailed test#

    "o# $D +"1# $D / +

    here# $D% expected mean of the difference of the matched pairs

    7 !he general procedure in finding the test value involves the following#

    Find the difference of the values of the pairs of data

    D % R1 R

  • 8/11/2019 9 Testing the Differences

    9/10

    Find the mean of the differences

    n

    DD = where nis the number of data pairs

    Find the standard deviation of the differences

    ( )

    1

    2

    2

    =

    nn

    DD

    sD

    Find the estimated standard error of the differences

    n

    ss DD =

    Finally, find the test value using#

    n

    s

    Dt

    D

    D

    =

    d.f. % n 1

    $D must be in accord with the hypothesis

    8 9xample

    A researcher desires to determine whether a personSs cholesterol level will change if a person ate

    oats for breafast every day. ?ix sub5ects were selected and their cholesterol levels in mg

  • 8/11/2019 9 Testing the Differences

    10/10

    Determine the test value using

    n

    DD = , mean of the difference

    7.166

    100==D

    ( )

    1

    22

    =

    n

    n

    DD

    sD

    standard deviation of the differences

    16

    6

    )100(4890

    2

    =Ds % 3.2

    n

    s

    Dt

    D

    D

    =

    64.25

    07.16 =t % 1.71+, test value

    Decide on whether to accept or re5ect the null hypothesis

    !he test value t % 1.71+ is less than :.C. % B.+13 and greater than :.C. % *.+13 which

    means it does not fall in the re5ection region.

    Inasmuch as the test value is not in the re5ection region, the null hypothesis must be

    accepted (while the alternative hypothesis is re5ected)

    ?ummarie the results

    !here is not enough evidence to support the claim that eating oats for breafast

    everyday in six wees will change the cholesterol level

    = !he confidence interval for the Oean Difference for small dependent samples is given by#

    n

    stD

    n

    stD D

    D

    D

    22

    +