SlideShare a Scribd company logo
1 of 57
Download to read offline
t-test
.Mahmoud Alhussami, DSc., Ph.D
Learning Objectives
• Compute by hand and interpret
  – Single sample t
  – Independent samples t
  – Dependent samples t
• Use SPSS to compute the same tests
  and interpret the output
Review 6 Steps for
      Significance Testing
1. Set alpha (p         4. Find the critical
   level).                 value of the
2. State hypotheses,       statistic.
   Null and             5. State the decision
   Alternative.            rule.
3. Calculate the test   6. State the
   statistic (sample       conclusion.
   value).
t-test
• t –test is about means: distribution and
  evaluation for group distribution
• Withdrawn form the normal distribution
• The shape of distribution depend on
  sample size and, the sum of all
  distributions is a normal distribution
• t- distribution is based on sample size and
  vary according to the degrees of freedom
What is the t -test
• t test is a useful technique for comparing
  mean values of two sets of numbers.
• The comparison will provide you with a
  statistic for evaluating whether the difference
  between two means is statistically significant.
• t test can be used either :
  1.to compare two independent groups (independent-
    samples t test)
  2.to compare observations from two measurement
    occasions for the same group (paired-samples t
    test).
What is the t -test
• The null hypothesis states that any
  difference between the two means is a
  result to difference in distribution.
• Remember, both samples drawn randomly
  form the same population.
• Comparing the chance of having difference
  is one group due to difference in
  distribution.
• Assuming that both distributions
  came from the same population, both
  distribution has to be equal.
What is the t -test
• Then, what we intend:
“To find the he difference due to chance”
• Logically, The larger the difference in means, the
   more likely to find a significant t test.
• But, recall:
1. Variability
More (less) variability = less overlap = larger
   difference
2. Sample size
Larger sample size = less variability (pop) = larger difference
Types
1.   The one-sample t test is used compare a single sample
     with a population value. For example, a test could be
     conducted to compare the average salary of nurses
     within a company with a value that was known to
     represent the national average for nurses.
2.   The independent-sample t test is used to compare two
     groups' scores on the same variable. For example, it
     could be used to compare the salaries of nurses and
     physicians to evaluate whether there is a difference in
     their salaries.
3.   The paired-sample t test is used to compare the means
     of two variables within a single group. For example, it
     could be used to see if there is a statistically significant
     difference between starting salaries and current salaries
     among the general nurses in an organization.
Assumptions of t-Test
• Dependent variables are interval or ratio.
• The population from which samples are
  drawn is normally distributed.
• Samples are randomly selected.
• The groups have equal variance
  (Homogeneity of variance).
• The t-statistic is robust (it is reasonably
  reliable even if assumptions are not fully
  met.
Assumption
1. Should be continuous (I/R)
2. the groups should be randomly
   drawn from normally distributed
   and independent populations
e.g. Male X Female
     Nurse X Physician
     Manager X Staff
NO OVER LAP
Assumption
3. the independent variable is categorical with two
   levels
4. Distribution for the two independent variables
   is normal
5. Equal variance (homogeneity of variance)
6. large variation = less likely to have sig t test =
   accepting null hypothesis (fail to reject) = Type
   II error = a threat to power
Sending an innocent to jail for no significant reason
Story of power and
        sample size
• Power is the probability of rejecting the
  null hypothesis
• The larger the sample size is most
  probability to be closer to population
  distribution
• Therefore, the sample and pop distribution
  will have less variation
• Less variation the more likely to reject the
  null hypothesis
• So, larger sample size = more power
  = significant t test
(One Sample Exercise (1
Testing whether light bulbs have a life of
1000 hours

1. Set alpha. α = .05
2. State hypotheses.
  – Null hypothesis is H0: µ = 1000.
  – Alternative hypothesis is H1: µ ≠ 1000.
3. Calculate the test statistic
Calculating the Single
        Sample t
 800   What is the mean of our sample?
 750            X = 867
 940   What is the standard deviation
 970   for our sample of light bulbs?
 790            SD= 96.73
 980        SD 96.73
       SE =    =     = 30.59
 820         N   10
 760
              X − µ 867 − 1000
1000     tX =      =           = −4.35
 860           SX     30.59
Determining Significance
4. Determine the critical value. Look
   up in the table (Heiman, p. 708).
   Looking for alpha = .05, two tails
   with df = 10-1 = 9. Table says
   2.262.
5. State decision rule. If absolute
   value of sample is greater than
   critical value, reject null.
    If |-4.35| > |2.262|, reject H0.
Finding Critical Values
    A portion of the t distribution table
t Values

• Critical value
  decreases if N is
  increased.
• Critical value
  decreases if
  alpha is
  increased.
• Differences
  between the
  means will not
  have to be as
  large to find sig
  if N is large or
  alpha is
Stating the Conclusion
6. State the conclusion. We reject the
null hypothesis that the bulbs were drawn
from a population in which the average life
is 1000 hrs. The difference between our
sample mean (867) and the mean of the
population (1000) is SO different that it is
unlikely that our sample could have been
drawn from a population with an average
life of 1000 hours.
SPSS Results
                           One-Sample Statistics

                                                                Std. Error
                      N            Mean       Std. Deviation      Mean
           BULBLIFE        10     867.0000          96.7299       30.5887


                                One-Sample Test

                                      Test Value = 1000
                                                                      95% Confidence
                                                                        Interval of the
                                                     Mean                 Difference
              t       df         Sig. (2-tailed)   Difference        Lower          Upper
BULBLIFE     -4.348        9               .002    -133.0000       -202.1964       -63.8036
       Computers print p values rather than critical
       values. If p (Sig.) is less than .05, it’s
       significant.
Steps For Comparing Groups
t-tests with
Two Samples
         Independent
        Samples t-test

         Dependent
        Samples t-test
Independent Samples t-test
• Used when we have two independent
  samples, e.g., treatment and control
  groups.
                                   X1 − X 2
• Formula is:         t X1 − X 2 =
                                    SEdiff
• Terms in the numerator are the sample
  means.
• Term in the denominator is the standard
  error of the difference between means.
Independent samples t-test

The formula for the standard error of the
difference in means:            2       2
                                SD1 SD2
                     SEdiff =       +
                                 N1   N2

Suppose we study the effect of caffeine on a
motor test where the task is to keep a the
mouse centered on a moving dot. Everyone
gets a drink; half get caffeine, half get
placebo; nobody knows who got what.
Independent Sample Data
             )(Data are time off task


     )Experimental (Caff Control (No Caffeine)
12                           21
14                           18
10                           14
8                            20
16                           11
5                            19
3                            8
9                            12
11                           13
                             15
N1=9, M1=9.778, SD1=4.1164   N2=10, M2=15.1, SD2=4.2805
Independent Sample
       )Steps(1

1. Set alpha. Alpha = .05
2. State Hypotheses.
    Null is H0: µ1 = µ2.
    Alternative is H1: µ1 ≠ µ2.
Independent Sample
             )Steps(2

  3.   Calculate test statistic:
    X 1 − X 2 9.778 − 15.1 − 5.322
 t=          =            =        = −2.758
     SEdiff      1.93       1.93
                     2             2   2    2
               SD    SD    (4.1164) (4.2805)
SEdiff =           +1
                         =         +
                                   2
                                             = 1.93
                N1    N2       9        10
Independent Sample
             )Steps(2

  3.   Calculate test statistic:
    X 1 − X 2 9.778 − 15.1 − 5.322
 t=          =            =        = −2.758
     SEdiff      1.93       1.93
                     2             2   2    2
               SD    SD    (4.1164) (4.2805)
SEdiff =           +1
                         =         +
                                   2
                                             = 1.93
                N1    N2       9        10
Independent Sample Steps
           )(3
4. Determine the critical value. Alpha is .
   05, 2 tails, and df = N1+N2-2 or 10+9-2
   = 17. The value is 2.11.
5. State decision rule. If |-2.758| > 2.11,
   then reject the null.
6. Conclusion: Reject the null. the
   population means are different. Caffeine
   has an effect on the motor pursuit task.
Using SPSS
• Open SPSS
• Open file “SPSS Examples” for Lab 5
• Go to:
  – “Analyze” then “Compare Means”
  – Choose “Independent samples t-test”
  – Put IV in “grouping variable” and DV in “test
    variable” box.
  – Define grouping variable numbers.
     • E.g., we labeled the experimental group as
       “1” in our data set and the control group as
       “2”
Independent Samples
          Exercise
Experimental   Control
12             20
14             18
10             14
8              20
16

Work this problem by hand and with SPSS.
You will have to enter the data into SPSS.
SPSS Results
                                                     Group Statistics

                                                                                                                       Std. Error
                     GROUP                                N             Mean              Std. Deviation                 Mean
        TIME         experimental group                       5         12.0000                  3.1623                   1.4142
                     control group                            4         18.0000                  2.8284                   1.4142

                                                  Independent Samples Test

                           Levene's Test for
                         Equality of Variances                                 t-test for Equality of Means
                                                                                                                         95% Confidence
                                                                                                                          Interval of the
                                                                                           Mean        Std. Error           Difference
                            F          Sig.      t            df       Sig. (2-tailed)   Difference    Difference       Lower         Upper
TIME   Equal variances
                                .130      .729   -2.958            7             .021       -6.0000           2.0284   -10.7963      -1.2037
       assumed
       Equal variances
                                                 -3.000       6.857              .020       -6.0000           2.0000   -10.7493      -1.2507
       not assumed
Dependent
Samples
  t-tests
Dependent Samples t-test
• Used when we have dependent samples –
  matched, paired or tied somehow
  – Repeated measures
  – Brother & sister, husband & wife
  – Left hand, right hand, etc.
• Useful to control individual differences.
  Can result in more powerful test than
  independent samples t-test.
Dependent Samples t
 Formulas:
                       D
              tXD   =
                      SEdiff
t is the difference in means over a standard error.
                          SDD
               SEdiff   =
                          n pairs
The standard error is found by finding the
difference between each pair of observations. The
standard deviation of these difference is SDD.
Divide SDD by sqrt(number of pairs) to get SEdiff.
Another way to write the
        formula

                 D
   tXD =
           SDD
                 n pairs
Dependent Samples t
     example
Person   Painfree   Placebo   Difference
         (time in
         sec)
1        60         55        5

2        35         20        15

3        70         60        10

4        50         45        5

5        60         60        0

M        55         48        7

SD       13.23      16.81     5.70
Dependent Samples t
        )Example (2

1. Set alpha = .05
2. Null hypothesis: H0: µ1 = µ2.
   Alternative is H1: µ1 ≠ µ2.
3. Calculate the test statistic:
                SD          5.70
     SEdiff =             =      = 2.55
                n pairs       5

       D       55 − 48    7
   t=        =         =      = 2.75
      SEdiff    2.55     2.55
Dependent Samples t
         )Example (3
4. Determine the critical value of t.
   Alpha =.05, tails=2
   df = N(pairs)-1 =5-1=4.
   Critical value is 2.776
5. Decision rule: is absolute value of
   sample value larger than critical value?
6. Conclusion. Not (quite) significant.
   Painfree does not have an effect.
Using SPSS for dependent t-
           test
• Open SPSS
• Open file “SPSS Examples” (same as
  before)
• Go to:
   – “Analyze” then “Compare Means”
   – Choose “Paired samples t-test”
   – Choose the two IV conditions you are
     comparing. Put in “paired variables
     box.”
Dependent t- SPSS output
                                              Paired Samples Statistics

                                                                                                   Std. Error
                                               Mean               N          Std. Deviation          Mean
                    Pair      PAINFREE         55.0000                  5          13.2288            5.9161
                    1         PLACEBO          48.0000                  5          16.8077            7.5166

                                         Paired Samples Correlations

                                                                 N            Correlation            Sig.
                 Pair 1    PAINFREE & PLACEBO                           5            .956               .011


                                                     Paired Samples Test

                                                   Paired Differences
                                                                           95% Confidence
                                                                             Interval of the
                                                          Std. Error           Difference
                               Mean      Std. Deviation     Mean          Lower          Upper        t         df       Sig. (2-tailed)
Pair 1   PAINFREE - PLACEBO     7.0000          5.7009       2.5495     -7.86E-02        14.0786      2.746          4             .052
Relationship between t Statistic and Power
              • To increase power:
                 – Increase the difference
                   between the means.
                 – Reduce the variance
                 – Increase N
                 – Increase α from α = .
                   01 to α = .05
To Increase Power
• Increase alpha, Power for α = .10 is
  greater than power for α = .05
• Increase the difference between
  means.
• Decrease the sd’s of the groups.
• Increase N.
Calculation of Power


                       From Table A.1 Zβ of .
                           54 is 20.5%
                             Power is
                       20.5% + 50% = 70.5%




                              In this
                             example
                           Power (1 - β )
                             = 70.5%
Calculation of
                                                  Sample Size to
                                                 Produce a Given
                                                       Power




      Compute Sample Size N for a Power of .80 at p = 0.05
The area of Zβ must be 30% (50% + 30% = 80%) From Table A.1
Zβ = .84
If the Mean Difference is 5 and SD is 6 then 22.6 subjects would
be required to have a power of .80
Power
• Research performed with insufficient
  power may result in a Type II error,
• Or waste time and money on a study
  that has little chance of rejecting the
  null.
• In power calculation, the values for
  mean and sd are usually not known
  beforehand.
• Either do a PILOT study or use prior
  research on similar subjects to
  estimate the mean and sd.
Independent t-Test
           For an Independent
            t-Test you need a
           grouping variable to
            define the groups.
             In this case the
            variable Group is
                defined as
                1 = Active
               2 = Passive
            Use value labels in
                  SPSS
Independent t-Test: Defining
        Variables




Be sure to
enter value   Grouping variable GROUP, the level of
  labels.          measurement is Nominal.
Independent t-Test
Independent t-Test: Independent
     & Dependent Variables
Independent t-Test: Define
         Groups
Independent t-Test: Options
Group Statistics
                                                                                                         Independent t-Test:
              Group           N                Mean        Std. Deviation
                                                                            Std. Error
                                                                              Mean
                                                                                                               Output
 Ab_Error     Active               10           2.2820           1.24438       .39351
              Passive              10           1.9660           1.50606       .47626




                                                                Independent Samples Test

                                Levene's Test for
                              Equality of Variances                                            t-test for Equality of Means
                                                                                                                                        95% Confidence
                                                                                                                                         Interval of the
                                                                                                           Mean        Std. Error          Difference
                                    F             Sig.           t           df        Sig. (2-tailed)   Difference    Difference      Lower         Upper
Ab_Error    Equal variances
                                        .513        .483             .511         18             .615        .31600           .61780   -.98194      1.61394
            assumed
            Equal variances
                                                                     .511   17.382               .615        .31600           .61780   -.98526      1.61726
            not assumed




  Assumptions: Groups have equal variance [F
= .513, p =.483, YOU DO NOT WANT THIS TO                                                                         Are the groups
   BE SIGNIFICANT. The groups have equal                                                                           different?
 variance, you have not violated an assumption
                  of t-statistic.                                                                          t(18) = .511, p = .615
                                                                                                             NO DIFFERENCE
                                                                                                            2.28 is not different
                                                                                                                 from 1.96
Dependent or Paired t-Test: Define
           Variables
Dependent or Paired t-Test: Select
        Paired-Samples
Dependent or Paired t-Test: Select
           Variables
Dependent or Paired t-Test: Options
Paired Samples Statistics

                                                                          Std. Error                 Dependent or Paired
         Pair     Pre
                            Mean
                             4.7000
                                            N
                                                10
                                                       Std. Deviation
                                                             2.11082
                                                                            Mean
                                                                             .66750
                                                                                                       t-Test: Output
         1        Post       6.2000             10           2.85968         .90431


                         Paired Samples Correlations

                                      N         Correlation             Sig.
         Pair 1   Pre & Post              10           .968                .000


                                                           Paired Samples Test

                                                 Paired Differences
                                                                            95% Confidence
                                                                              Interval of the
                                                         Std. Error             Difference
                           Mean       Std. Deviation       Mean            Lower          Upper        t       df       Sig. (2-tailed)
Pair 1     Pre - Post     -1.50000           .97183         .30732        -2.19520         -.80480    -4.881        9             .001




                         Is there a difference between pre & post?
                                            t(9) = -4.881, p = .001
                         Yes, 4.7 is significantly different from 6.2

More Related Content

What's hot (20)

Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Tests of significance
Tests of significanceTests of significance
Tests of significance
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 
Two sample t-test
Two sample t-testTwo sample t-test
Two sample t-test
 
Chi squared test
Chi squared testChi squared test
Chi squared test
 
Z test
Z testZ test
Z test
 
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)
 
Anova ppt
Anova pptAnova ppt
Anova ppt
 
Chi square test
Chi square testChi square test
Chi square test
 
Anova; analysis of variance
Anova; analysis of varianceAnova; analysis of variance
Anova; analysis of variance
 
Analysis of variance (ANOVA)
Analysis of variance (ANOVA)Analysis of variance (ANOVA)
Analysis of variance (ANOVA)
 
Non-Parametric Tests
Non-Parametric TestsNon-Parametric Tests
Non-Parametric Tests
 
Chi – square test
Chi – square testChi – square test
Chi – square test
 
Kruskal Wall Test
Kruskal Wall TestKruskal Wall Test
Kruskal Wall Test
 
Test of significance in Statistics
Test of significance in StatisticsTest of significance in Statistics
Test of significance in Statistics
 
Normal Distribution
Normal DistributionNormal Distribution
Normal Distribution
 
LEVEL OF SIGNIFICANCE.pptx
LEVEL OF SIGNIFICANCE.pptxLEVEL OF SIGNIFICANCE.pptx
LEVEL OF SIGNIFICANCE.pptx
 
Wilcoxon signed rank test
Wilcoxon signed rank testWilcoxon signed rank test
Wilcoxon signed rank test
 
Null hypothesis
Null hypothesisNull hypothesis
Null hypothesis
 

Viewers also liked

Dependent T Test
Dependent T TestDependent T Test
Dependent T Testshoffma5
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Dr Bryan Mills
 
T Test For Two Independent Samples
T Test For Two Independent SamplesT Test For Two Independent Samples
T Test For Two Independent Samplesshoffma5
 
Chapter 22 Difference of Proportions
Chapter 22 Difference of ProportionsChapter 22 Difference of Proportions
Chapter 22 Difference of Proportionschristjt
 
T test แบบกลุ่มเดียว
T test แบบกลุ่มเดียวT test แบบกลุ่มเดียว
T test แบบกลุ่มเดียวBanbatu Mittraphap
 
IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...Lawrence kok
 
C2 st lecture 11 the t-test handout
C2 st lecture 11   the t-test handoutC2 st lecture 11   the t-test handout
C2 st lecture 11 the t-test handoutfatima d
 
Day 11 t test for independent samples
Day 11 t test for independent samplesDay 11 t test for independent samples
Day 11 t test for independent samplesElih Sutisna Yanto
 
Independent sample t test
Independent sample t testIndependent sample t test
Independent sample t testShajar Khan
 
Lecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleLecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleAhmadullah
 
Introduction to Analysis of Variance
Introduction to Analysis of VarianceIntroduction to Analysis of Variance
Introduction to Analysis of Variancejasondroesch
 
One Way Anova
One Way AnovaOne Way Anova
One Way Anovashoffma5
 
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Intervalghalan
 

Viewers also liked (20)

Dependent T Test
Dependent T TestDependent T Test
Dependent T Test
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
 
ANOVA
ANOVAANOVA
ANOVA
 
T Test For Two Independent Samples
T Test For Two Independent SamplesT Test For Two Independent Samples
T Test For Two Independent Samples
 
Student t-test
Student t-testStudent t-test
Student t-test
 
Chapter 22 Difference of Proportions
Chapter 22 Difference of ProportionsChapter 22 Difference of Proportions
Chapter 22 Difference of Proportions
 
Sample size calculation final
Sample size calculation finalSample size calculation final
Sample size calculation final
 
T test แบบกลุ่มเดียว
T test แบบกลุ่มเดียวT test แบบกลุ่มเดียว
T test แบบกลุ่มเดียว
 
IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...IB Chemistry uncertainty error, standard deviation, error analysis and t test...
IB Chemistry uncertainty error, standard deviation, error analysis and t test...
 
C2 st lecture 11 the t-test handout
C2 st lecture 11   the t-test handoutC2 st lecture 11   the t-test handout
C2 st lecture 11 the t-test handout
 
Ppt anova k elompok 6
Ppt anova k elompok 6Ppt anova k elompok 6
Ppt anova k elompok 6
 
Day 11 t test for independent samples
Day 11 t test for independent samplesDay 11 t test for independent samples
Day 11 t test for independent samples
 
Independent sample t test
Independent sample t testIndependent sample t test
Independent sample t test
 
02a one sample_t-test
02a one sample_t-test02a one sample_t-test
02a one sample_t-test
 
One way anova
One way anovaOne way anova
One way anova
 
Lecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two SampleLecture 7 Hypothesis Testing Two Sample
Lecture 7 Hypothesis Testing Two Sample
 
Introduction to Analysis of Variance
Introduction to Analysis of VarianceIntroduction to Analysis of Variance
Introduction to Analysis of Variance
 
One Way Anova
One Way AnovaOne Way Anova
One Way Anova
 
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
 
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Interval
 

Similar to t-test guide

Lecture 11 Paired t test.pptx
Lecture 11 Paired t test.pptxLecture 11 Paired t test.pptx
Lecture 11 Paired t test.pptxshakirRahman10
 
Str t-test1
Str   t-test1Str   t-test1
Str t-test1iamkim
 
Test of hypothesis (t)
Test of hypothesis (t)Test of hypothesis (t)
Test of hypothesis (t)Marlon Gomez
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-testChristina K J
 
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-testHypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-testRavindra Nath Shukla
 
09 test of hypothesis small sample.ppt
09 test of hypothesis small sample.ppt09 test of hypothesis small sample.ppt
09 test of hypothesis small sample.pptPooja Sakhla
 
Fundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data DescriptionsFundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data Descriptionsemonfahim11
 
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdfDr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdfHassanMohyUdDin2
 
Unit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdf
Unit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdfUnit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdf
Unit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdfRavinandan A P
 

Similar to t-test guide (20)

Unit-5.-t-test.ppt
Unit-5.-t-test.pptUnit-5.-t-test.ppt
Unit-5.-t-test.ppt
 
Lecture 11 Paired t test.pptx
Lecture 11 Paired t test.pptxLecture 11 Paired t test.pptx
Lecture 11 Paired t test.pptx
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Statistics chm 235
Statistics chm 235Statistics chm 235
Statistics chm 235
 
Str t-test1
Str   t-test1Str   t-test1
Str t-test1
 
Factorial Experiments
Factorial ExperimentsFactorial Experiments
Factorial Experiments
 
Test of hypothesis (t)
Test of hypothesis (t)Test of hypothesis (t)
Test of hypothesis (t)
 
Stat2013
Stat2013Stat2013
Stat2013
 
The T-test
The T-testThe T-test
The T-test
 
PARAMETRIC STATISTICS .pptx
PARAMETRIC STATISTICS .pptxPARAMETRIC STATISTICS .pptx
PARAMETRIC STATISTICS .pptx
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-test
 
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-testHypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
 
Two dependent samples (matched pairs)
Two dependent samples (matched pairs) Two dependent samples (matched pairs)
Two dependent samples (matched pairs)
 
09 test of hypothesis small sample.ppt
09 test of hypothesis small sample.ppt09 test of hypothesis small sample.ppt
09 test of hypothesis small sample.ppt
 
Fundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data DescriptionsFundamentals of Sampling Distribution and Data Descriptions
Fundamentals of Sampling Distribution and Data Descriptions
 
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdfDr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
 
Standard deviation
Standard deviationStandard deviation
Standard deviation
 
lecture8.ppt
lecture8.pptlecture8.ppt
lecture8.ppt
 
Lecture8
Lecture8Lecture8
Lecture8
 
Unit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdf
Unit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdfUnit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdf
Unit-I Measures of Dispersion- Biostatistics - Ravinandan A P.pdf
 

More from Mohammad Ihmeidan

Anatomy physiology and embryology of urinary tract
Anatomy physiology and embryology of urinary tractAnatomy physiology and embryology of urinary tract
Anatomy physiology and embryology of urinary tractMohammad Ihmeidan
 
Medical History taking form introductory course
Medical History taking form introductory courseMedical History taking form introductory course
Medical History taking form introductory courseMohammad Ihmeidan
 
Male reproductive system - Anatomy
Male reproductive system - AnatomyMale reproductive system - Anatomy
Male reproductive system - AnatomyMohammad Ihmeidan
 
The cystoscope and accessories
The cystoscope  and accessoriesThe cystoscope  and accessories
The cystoscope and accessoriesMohammad Ihmeidan
 
Physicochemistry of renal stones
Physicochemistry of renal stonesPhysicochemistry of renal stones
Physicochemistry of renal stonesMohammad Ihmeidan
 
Hepatic adenoma vs focal nodular hyperplasia
Hepatic adenoma vs focal nodular hyperplasiaHepatic adenoma vs focal nodular hyperplasia
Hepatic adenoma vs focal nodular hyperplasiaMohammad Ihmeidan
 
ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,
 ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,  ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,
ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser, Mohammad Ihmeidan
 
نحن نعيش في عالم
نحن نعيش في عالمنحن نعيش في عالم
نحن نعيش في عالمMohammad Ihmeidan
 
اللغة العربية و المصطلح العلمي
اللغة العربية و المصطلح العلمياللغة العربية و المصطلح العلمي
اللغة العربية و المصطلح العلميMohammad Ihmeidan
 

More from Mohammad Ihmeidan (20)

Anatomy physiology and embryology of urinary tract
Anatomy physiology and embryology of urinary tractAnatomy physiology and embryology of urinary tract
Anatomy physiology and embryology of urinary tract
 
Fusion prostatic biopsy
Fusion prostatic biopsyFusion prostatic biopsy
Fusion prostatic biopsy
 
Renal cell carcinoma
Renal cell carcinomaRenal cell carcinoma
Renal cell carcinoma
 
Medical History taking form introductory course
Medical History taking form introductory courseMedical History taking form introductory course
Medical History taking form introductory course
 
Male reproductive system - Anatomy
Male reproductive system - AnatomyMale reproductive system - Anatomy
Male reproductive system - Anatomy
 
Testicular tumors
Testicular tumors Testicular tumors
Testicular tumors
 
Vesico ureteral reflux
Vesico ureteral reflux Vesico ureteral reflux
Vesico ureteral reflux
 
Wilms tumors
Wilms tumorsWilms tumors
Wilms tumors
 
Bladder injuries
Bladder injuriesBladder injuries
Bladder injuries
 
Urethral trauma
Urethral traumaUrethral trauma
Urethral trauma
 
The cystoscope and accessories
The cystoscope  and accessoriesThe cystoscope  and accessories
The cystoscope and accessories
 
Physicochemistry of renal stones
Physicochemistry of renal stonesPhysicochemistry of renal stones
Physicochemistry of renal stones
 
Postobstructive diuresis
Postobstructive diuresisPostobstructive diuresis
Postobstructive diuresis
 
Renal physiology
Renal physiology Renal physiology
Renal physiology
 
Peri-operative Anaphylaxis
Peri-operative Anaphylaxis Peri-operative Anaphylaxis
Peri-operative Anaphylaxis
 
Hepatic adenoma vs focal nodular hyperplasia
Hepatic adenoma vs focal nodular hyperplasiaHepatic adenoma vs focal nodular hyperplasia
Hepatic adenoma vs focal nodular hyperplasia
 
Hepatic artery varients
Hepatic artery varientsHepatic artery varients
Hepatic artery varients
 
ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,
 ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,  ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,
ABSITE Review: Practice Questions, Second Edition 2nd edition by FIser,
 
نحن نعيش في عالم
نحن نعيش في عالمنحن نعيش في عالم
نحن نعيش في عالم
 
اللغة العربية و المصطلح العلمي
اللغة العربية و المصطلح العلمياللغة العربية و المصطلح العلمي
اللغة العربية و المصطلح العلمي
 

Recently uploaded

Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Osopher
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroomSamsung Business USA
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...Nguyen Thanh Tu Collection
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 

Recently uploaded (20)

Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN THEO CÂU CHO HỌC SINH LỚP 12 ĐỂ ĐẠT ĐIỂM 5+ THI TỐT NGHIỆP THPT ...
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 

t-test guide

  • 2. Learning Objectives • Compute by hand and interpret – Single sample t – Independent samples t – Dependent samples t • Use SPSS to compute the same tests and interpret the output
  • 3. Review 6 Steps for Significance Testing 1. Set alpha (p 4. Find the critical level). value of the 2. State hypotheses, statistic. Null and 5. State the decision Alternative. rule. 3. Calculate the test 6. State the statistic (sample conclusion. value).
  • 4. t-test • t –test is about means: distribution and evaluation for group distribution • Withdrawn form the normal distribution • The shape of distribution depend on sample size and, the sum of all distributions is a normal distribution • t- distribution is based on sample size and vary according to the degrees of freedom
  • 5. What is the t -test • t test is a useful technique for comparing mean values of two sets of numbers. • The comparison will provide you with a statistic for evaluating whether the difference between two means is statistically significant. • t test can be used either : 1.to compare two independent groups (independent- samples t test) 2.to compare observations from two measurement occasions for the same group (paired-samples t test).
  • 6. What is the t -test • The null hypothesis states that any difference between the two means is a result to difference in distribution. • Remember, both samples drawn randomly form the same population. • Comparing the chance of having difference is one group due to difference in distribution. • Assuming that both distributions came from the same population, both distribution has to be equal.
  • 7. What is the t -test • Then, what we intend: “To find the he difference due to chance” • Logically, The larger the difference in means, the more likely to find a significant t test. • But, recall: 1. Variability More (less) variability = less overlap = larger difference 2. Sample size Larger sample size = less variability (pop) = larger difference
  • 8. Types 1. The one-sample t test is used compare a single sample with a population value. For example, a test could be conducted to compare the average salary of nurses within a company with a value that was known to represent the national average for nurses. 2. The independent-sample t test is used to compare two groups' scores on the same variable. For example, it could be used to compare the salaries of nurses and physicians to evaluate whether there is a difference in their salaries. 3. The paired-sample t test is used to compare the means of two variables within a single group. For example, it could be used to see if there is a statistically significant difference between starting salaries and current salaries among the general nurses in an organization.
  • 9. Assumptions of t-Test • Dependent variables are interval or ratio. • The population from which samples are drawn is normally distributed. • Samples are randomly selected. • The groups have equal variance (Homogeneity of variance). • The t-statistic is robust (it is reasonably reliable even if assumptions are not fully met.
  • 10. Assumption 1. Should be continuous (I/R) 2. the groups should be randomly drawn from normally distributed and independent populations e.g. Male X Female Nurse X Physician Manager X Staff NO OVER LAP
  • 11. Assumption 3. the independent variable is categorical with two levels 4. Distribution for the two independent variables is normal 5. Equal variance (homogeneity of variance) 6. large variation = less likely to have sig t test = accepting null hypothesis (fail to reject) = Type II error = a threat to power Sending an innocent to jail for no significant reason
  • 12. Story of power and sample size • Power is the probability of rejecting the null hypothesis • The larger the sample size is most probability to be closer to population distribution • Therefore, the sample and pop distribution will have less variation • Less variation the more likely to reject the null hypothesis • So, larger sample size = more power = significant t test
  • 13. (One Sample Exercise (1 Testing whether light bulbs have a life of 1000 hours 1. Set alpha. α = .05 2. State hypotheses. – Null hypothesis is H0: µ = 1000. – Alternative hypothesis is H1: µ ≠ 1000. 3. Calculate the test statistic
  • 14. Calculating the Single Sample t 800 What is the mean of our sample? 750 X = 867 940 What is the standard deviation 970 for our sample of light bulbs? 790 SD= 96.73 980 SD 96.73 SE = = = 30.59 820 N 10 760 X − µ 867 − 1000 1000 tX = = = −4.35 860 SX 30.59
  • 15. Determining Significance 4. Determine the critical value. Look up in the table (Heiman, p. 708). Looking for alpha = .05, two tails with df = 10-1 = 9. Table says 2.262. 5. State decision rule. If absolute value of sample is greater than critical value, reject null. If |-4.35| > |2.262|, reject H0.
  • 16. Finding Critical Values A portion of the t distribution table
  • 17. t Values • Critical value decreases if N is increased. • Critical value decreases if alpha is increased. • Differences between the means will not have to be as large to find sig if N is large or alpha is
  • 18. Stating the Conclusion 6. State the conclusion. We reject the null hypothesis that the bulbs were drawn from a population in which the average life is 1000 hrs. The difference between our sample mean (867) and the mean of the population (1000) is SO different that it is unlikely that our sample could have been drawn from a population with an average life of 1000 hours.
  • 19. SPSS Results One-Sample Statistics Std. Error N Mean Std. Deviation Mean BULBLIFE 10 867.0000 96.7299 30.5887 One-Sample Test Test Value = 1000 95% Confidence Interval of the Mean Difference t df Sig. (2-tailed) Difference Lower Upper BULBLIFE -4.348 9 .002 -133.0000 -202.1964 -63.8036 Computers print p values rather than critical values. If p (Sig.) is less than .05, it’s significant.
  • 21. t-tests with Two Samples Independent Samples t-test Dependent Samples t-test
  • 22. Independent Samples t-test • Used when we have two independent samples, e.g., treatment and control groups. X1 − X 2 • Formula is: t X1 − X 2 = SEdiff • Terms in the numerator are the sample means. • Term in the denominator is the standard error of the difference between means.
  • 23. Independent samples t-test The formula for the standard error of the difference in means: 2 2 SD1 SD2 SEdiff = + N1 N2 Suppose we study the effect of caffeine on a motor test where the task is to keep a the mouse centered on a moving dot. Everyone gets a drink; half get caffeine, half get placebo; nobody knows who got what.
  • 24. Independent Sample Data )(Data are time off task )Experimental (Caff Control (No Caffeine) 12 21 14 18 10 14 8 20 16 11 5 19 3 8 9 12 11 13 15 N1=9, M1=9.778, SD1=4.1164 N2=10, M2=15.1, SD2=4.2805
  • 25. Independent Sample )Steps(1 1. Set alpha. Alpha = .05 2. State Hypotheses. Null is H0: µ1 = µ2. Alternative is H1: µ1 ≠ µ2.
  • 26. Independent Sample )Steps(2 3. Calculate test statistic: X 1 − X 2 9.778 − 15.1 − 5.322 t= = = = −2.758 SEdiff 1.93 1.93 2 2 2 2 SD SD (4.1164) (4.2805) SEdiff = +1 = + 2 = 1.93 N1 N2 9 10
  • 27. Independent Sample )Steps(2 3. Calculate test statistic: X 1 − X 2 9.778 − 15.1 − 5.322 t= = = = −2.758 SEdiff 1.93 1.93 2 2 2 2 SD SD (4.1164) (4.2805) SEdiff = +1 = + 2 = 1.93 N1 N2 9 10
  • 28. Independent Sample Steps )(3 4. Determine the critical value. Alpha is . 05, 2 tails, and df = N1+N2-2 or 10+9-2 = 17. The value is 2.11. 5. State decision rule. If |-2.758| > 2.11, then reject the null. 6. Conclusion: Reject the null. the population means are different. Caffeine has an effect on the motor pursuit task.
  • 29. Using SPSS • Open SPSS • Open file “SPSS Examples” for Lab 5 • Go to: – “Analyze” then “Compare Means” – Choose “Independent samples t-test” – Put IV in “grouping variable” and DV in “test variable” box. – Define grouping variable numbers. • E.g., we labeled the experimental group as “1” in our data set and the control group as “2”
  • 30. Independent Samples Exercise Experimental Control 12 20 14 18 10 14 8 20 16 Work this problem by hand and with SPSS. You will have to enter the data into SPSS.
  • 31. SPSS Results Group Statistics Std. Error GROUP N Mean Std. Deviation Mean TIME experimental group 5 12.0000 3.1623 1.4142 control group 4 18.0000 2.8284 1.4142 Independent Samples Test Levene's Test for Equality of Variances t-test for Equality of Means 95% Confidence Interval of the Mean Std. Error Difference F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper TIME Equal variances .130 .729 -2.958 7 .021 -6.0000 2.0284 -10.7963 -1.2037 assumed Equal variances -3.000 6.857 .020 -6.0000 2.0000 -10.7493 -1.2507 not assumed
  • 33. Dependent Samples t-test • Used when we have dependent samples – matched, paired or tied somehow – Repeated measures – Brother & sister, husband & wife – Left hand, right hand, etc. • Useful to control individual differences. Can result in more powerful test than independent samples t-test.
  • 34. Dependent Samples t Formulas: D tXD = SEdiff t is the difference in means over a standard error. SDD SEdiff = n pairs The standard error is found by finding the difference between each pair of observations. The standard deviation of these difference is SDD. Divide SDD by sqrt(number of pairs) to get SEdiff.
  • 35. Another way to write the formula D tXD = SDD n pairs
  • 36. Dependent Samples t example Person Painfree Placebo Difference (time in sec) 1 60 55 5 2 35 20 15 3 70 60 10 4 50 45 5 5 60 60 0 M 55 48 7 SD 13.23 16.81 5.70
  • 37. Dependent Samples t )Example (2 1. Set alpha = .05 2. Null hypothesis: H0: µ1 = µ2. Alternative is H1: µ1 ≠ µ2. 3. Calculate the test statistic: SD 5.70 SEdiff = = = 2.55 n pairs 5 D 55 − 48 7 t= = = = 2.75 SEdiff 2.55 2.55
  • 38. Dependent Samples t )Example (3 4. Determine the critical value of t. Alpha =.05, tails=2 df = N(pairs)-1 =5-1=4. Critical value is 2.776 5. Decision rule: is absolute value of sample value larger than critical value? 6. Conclusion. Not (quite) significant. Painfree does not have an effect.
  • 39. Using SPSS for dependent t- test • Open SPSS • Open file “SPSS Examples” (same as before) • Go to: – “Analyze” then “Compare Means” – Choose “Paired samples t-test” – Choose the two IV conditions you are comparing. Put in “paired variables box.”
  • 40. Dependent t- SPSS output Paired Samples Statistics Std. Error Mean N Std. Deviation Mean Pair PAINFREE 55.0000 5 13.2288 5.9161 1 PLACEBO 48.0000 5 16.8077 7.5166 Paired Samples Correlations N Correlation Sig. Pair 1 PAINFREE & PLACEBO 5 .956 .011 Paired Samples Test Paired Differences 95% Confidence Interval of the Std. Error Difference Mean Std. Deviation Mean Lower Upper t df Sig. (2-tailed) Pair 1 PAINFREE - PLACEBO 7.0000 5.7009 2.5495 -7.86E-02 14.0786 2.746 4 .052
  • 41. Relationship between t Statistic and Power • To increase power: – Increase the difference between the means. – Reduce the variance – Increase N – Increase α from α = . 01 to α = .05
  • 42. To Increase Power • Increase alpha, Power for α = .10 is greater than power for α = .05 • Increase the difference between means. • Decrease the sd’s of the groups. • Increase N.
  • 43. Calculation of Power From Table A.1 Zβ of . 54 is 20.5% Power is 20.5% + 50% = 70.5% In this example Power (1 - β ) = 70.5%
  • 44. Calculation of Sample Size to Produce a Given Power Compute Sample Size N for a Power of .80 at p = 0.05 The area of Zβ must be 30% (50% + 30% = 80%) From Table A.1 Zβ = .84 If the Mean Difference is 5 and SD is 6 then 22.6 subjects would be required to have a power of .80
  • 45. Power • Research performed with insufficient power may result in a Type II error, • Or waste time and money on a study that has little chance of rejecting the null. • In power calculation, the values for mean and sd are usually not known beforehand. • Either do a PILOT study or use prior research on similar subjects to estimate the mean and sd.
  • 46. Independent t-Test For an Independent t-Test you need a grouping variable to define the groups. In this case the variable Group is defined as 1 = Active 2 = Passive Use value labels in SPSS
  • 47. Independent t-Test: Defining Variables Be sure to enter value Grouping variable GROUP, the level of labels. measurement is Nominal.
  • 49. Independent t-Test: Independent & Dependent Variables
  • 52. Group Statistics Independent t-Test: Group N Mean Std. Deviation Std. Error Mean Output Ab_Error Active 10 2.2820 1.24438 .39351 Passive 10 1.9660 1.50606 .47626 Independent Samples Test Levene's Test for Equality of Variances t-test for Equality of Means 95% Confidence Interval of the Mean Std. Error Difference F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper Ab_Error Equal variances .513 .483 .511 18 .615 .31600 .61780 -.98194 1.61394 assumed Equal variances .511 17.382 .615 .31600 .61780 -.98526 1.61726 not assumed Assumptions: Groups have equal variance [F = .513, p =.483, YOU DO NOT WANT THIS TO Are the groups BE SIGNIFICANT. The groups have equal different? variance, you have not violated an assumption of t-statistic. t(18) = .511, p = .615 NO DIFFERENCE 2.28 is not different from 1.96
  • 53. Dependent or Paired t-Test: Define Variables
  • 54. Dependent or Paired t-Test: Select Paired-Samples
  • 55. Dependent or Paired t-Test: Select Variables
  • 56. Dependent or Paired t-Test: Options
  • 57. Paired Samples Statistics Std. Error Dependent or Paired Pair Pre Mean 4.7000 N 10 Std. Deviation 2.11082 Mean .66750 t-Test: Output 1 Post 6.2000 10 2.85968 .90431 Paired Samples Correlations N Correlation Sig. Pair 1 Pre & Post 10 .968 .000 Paired Samples Test Paired Differences 95% Confidence Interval of the Std. Error Difference Mean Std. Deviation Mean Lower Upper t df Sig. (2-tailed) Pair 1 Pre - Post -1.50000 .97183 .30732 -2.19520 -.80480 -4.881 9 .001 Is there a difference between pre & post? t(9) = -4.881, p = .001 Yes, 4.7 is significantly different from 6.2

Editor's Notes

  1. 1 .      Set Alpha level, probability of Type I error, that is probability that we will conclude there is a difference when there really is not. Typically set at .05, or 5 chances in 100 to be wrong in this way . 2 .      State hypotheses. Null hypothesis: represents a position that the treatment has no effect. Alternative hypothesis is that the treatment has an effect. In the light bulb example Ho: mu = 1000 hours H1: mu is not equal to 1000 hours 3 .      Calculate the test statistic. (see next slide for values ) 4 .      Determine the critical value of the statistic . 5 .      State the decision rule: e.g., if the statistic computed is greater than the critical value, then reject the null hypothesis . Conclusion: the result is significant or it is not significant. Write up the results .
  2. Let’s do the steps : 1 .      Set alpha = .05. If there is no difference, we will be wrong only 5 times in 100 . 2 .      State hypotheses. (Null) H 0 :  = 1000. (Alternative) H 1 :   1000. We are testing to see if our light bulbs came from a population where average life is 1000 hours . 3 .      Calculate the test statistic .
  3. Go over the answers to exercise with them . M = 867 SD = 96.7299 SE= 30.58867 t = -4.35 Reject H 0 Bulbs were not drawn from population with 1000 hr life . Any questions ?
  4. 4 . Determine the critical value of the statistic. We look this up in a table. We need to know alpha (.05, two-tailed) and the degrees of freedom (df). For this test, the df are N-1, in our case 10-1 = 9. According to the table, the critical value is 2.262 . 5 .      State the decision rule: If the absolute value of the test statistic is greater that the critical value, we reject the null hypothesis. In our case, if |-.33| is greater than 2.262, we reject the hypothesis that  = 1000. This is not the case here .
  5. State the conclusion . Our results suggest that GE’s claim that their light bulbs last 1,000 hours is FALSE. (because we had a sample of 10 GE light bulbs and our sample mean was so far away from 1,000 hours that it is highly unlikely that these bulbs came from a population of bulbs whose mean is really 1,000.) There is a 5% chance that this conclusion is wrong (I.e., we may have gotten a difference this big just by chance factors alone ).
  6. On Brannick’s website, Research Methods, Labs, Lab Presentations. Click on Lab 5 SPSS Examples, the Open. SPSS should run and the data for this lab should appear. In the middle is the column ltbulb. This has the data for the ligtbulb example. In the SPSS data editor, click Analyze, Compare Means, One-Sample T Test. Select ltbulb and put it in the Test Variables box. Type 1000 in the Test Value box. Click OK. You get the output on this slide .
  7. Here we have two different samples, and we want to know if they were drawn from populations with two different means. This is equivalent to saying whether a treatment has an effect given a treatment group and a control group. The formula for this t is on the slide . Here t is the test statistic, and the terms in the numerator are the sample and population means. The term in the denominator is SE diff , which is the standard error of the difference between means . You can see from the subscripts for both t and SE, that we are now dealing with the Sampling Distribution of the DIFFERENCE between the means. This is very similar to the sampling distribution that we created last week. However, what we would do to create a sampling distribution of the differences between the means is rather than selecting 5 scores and computing a mean, we would select 5 pairs of scores, subtract one value from the other, then calculate the mean DIFFERENCE value . If we are doing a study and have two groups, what do we EXPECT that the difference in their mean scores will be ? [ They should say zero ]. Thus, the mean of the sampling distribution of the differences between the means is zero . The subscripts are here to tell you which Sampling Distribution we are dealing with (for the Sampling Distribution of Means last week, we had a subscript X-bar. For the sampling distribution of the differences between the means, we have a notation specifying a difference, specifically, the difference between X-bar1 and X-bar2 .
  8. Suppose we have two samples taken from the same population. Suppose we compute the mean for each sample and subtract the mean for sample 2 from sample 1. We will get a difference between sample means. If we do this a lot, on average, that difference will be zero. Most of the time it won’t be exactly zero, however. The amount that the difference wanders from zero on average is , the standard error of the difference .
  9. So let’s say we do the following study. We bring in our volunteers and give each of them a psychomotor test where they use a mouse to keep a dot centered on a computer screen target that keeps moving away (pursuit task). One hour before the test, both groups get an oral dose of a drug. For every other person (1/2 of the people), the drug is caffeine. For the other half, it’s a placebo. Nobody in the study knows who got what. All take the test. The results are in the slide .
  10. 1 . Set alpha = .05, two tailed (just a difference, not a prediction of greater n or less than ). 2 .  Null Hypothesis: . This is the same as . This says that there is no difference between the drug group and the placebo group in psychomotor performance in the population. The alternative hypothesis is that the drug does have an effect, or  
  11. 3 .  Calculate the test statistic (see the slide ).  
  12. 3 .  Calculate the test statistic (see the slide ).  
  13. 4 . Determine the critical value of the statistic. We look this up in a table . Alpha is .05, t is 2-tailed and the df are n 1 +n 2 -2, or in our case, 17. The critical value is 2.110 . 5 .   State the decision rule. If the absolute value of the test statistic is larger than the critical value, reject the null hypothesis. If |-2.758| > 2.110, reject the null . 6 .   Conclusion, the population means are different. The result is significant at p < .05 .
  14. Make sure that they look at the data in SPSS to see how the groups were defined and how that relates to the “define groups” task .
  15. Have them work this one. Assume again that this is time off task for the DV . Here are the answers for the independent samples exercise M1 = 12 , M2 = 18 SD1 = 3.162278, SD2 = 2.8284227 Std Error = 2 t = -6/2 = -3; df = 5 + 4 - 2 = 7 t(.05) = 2.3646; 3 > 2.3646 Reject null hypothesis We conclude that caffeine has an effect . Be sure to cover the relevant areas of the SPSS printout. You should show them where everything that they calculate by hand is on the printout. Also cover the Levene’s test. Explain that if the Levene’s test is significant, we need to use the row that says ‘equal variances NOT assumed”. We do NOT want the Levene’s test to be significant as it violates an assumption of the t-test .
  16. We use this when we have measures on the same people in both conditions (or other dependency in the data). Usually there are individual differences among people that are relatively enduring. For example, suppose we tested the same people on the psychomotor test twice. Some people would be very good at it. Others would be relatively poor at it. The dependent t allows us to take these individual differences into account. The scores on the variable in one treatment will be correlated with the scores on the other treatment . If the observations are positively correlated (most people score either high on both or low on both) and if there is a difference in means, we are more likely to show it with the dependent t-test than with the independent samples t-test. [Emphasize this point, they need to know it for their homework .]
  17. We are still dealing with the Sampling Distribution of the Difference between the means. Our subscript is different here, but says basically the same thing. We are looking at the MEAN DIFFERENCE SCORE. The subscript for the independent samples t said we were looking at the DIFFERENCE BETWEEN THE MEANS .
  18. In this formula, we just put the formula for Se diff in the denominator instead of having you calculate it separately. [this is the formula that appears on the “Guide to Statistics” sheet they can download .
  19. Suppose that we are testing Painfree, a drug to replace aspirin. Five people are selected to test the drug. On day one, ½ get painfree, and the other get a placebo. Then all put their hands into icewater until it hurts so bad they have to pull their hands from the water. We record how long it takes. The next day, they come back and take the other treatment. (Counterbalancing & double blind .)
  20.   1 .      Set alpha = .05, two tailed (just a difference, not a prediction of greater or less than ). 2 .      Null Hypothesis: . This is the same as . This says that there is no difference between the pain killer and the placebo in the population. The alternative hypothesis is that the pain killer does have an effect, or 3 .      Calculate the test statistic (see slide ).  
  21. 4 . Determine the critical value of the statistic. We look this up in a table. Alpha is .05, t is 2-tailed and our df are N-1, where N is the number of pairs . In this case df = 5-1 = 4. The critical value is 2.776 . 5 . State the decision rule. If the absolute value of the test statistic is larger than the critical value, reject the null hypothesis. If |2.75| > 2.776, reject the null . 6 .      Conclusion. he population means are not (quite) different. The result is not significant at p < .05 .  
  22. Point out that the data for an independent t-test and dependent t-test must be entered differently in SPSS . [ They should choose “painfree” and “placebo” to put in the paired variables box .]
  23. Go over output. Have them start on their homework or project .