< Return to Video

Paired t-test with Confidence Intervals in Excel 2016

  • 0:04 - 0:06
    ♪ (music) ♪
  • 0:10 - 0:12
    In this tutorial you
    will learn how to do
  • 0:12 - 0:15
    a paired samples t-tests,
    in Excel 2016.
  • 0:16 - 0:18
    In this comparison we
    will compare
  • 0:18 - 0:20
    the stats pre and post
    scores for students.
  • 0:21 - 0:26
    So first I'll start by taking both
    columns, highlighting them,
  • 0:26 - 0:29
    copying them, and pasting
    them into a new sheet.
  • 0:29 - 0:31
    Now in order to do a paired
    samples t-test
  • 0:31 - 0:34
    we have to have the
    same number of data points,
  • 0:34 - 0:35
    in both columns.
  • 0:35 - 0:37
    So as you can see
    here in row 11,
  • 0:37 - 0:39
    we have missing data.
  • 0:39 - 0:41
    We cannot conduct this
    test with missing data,
  • 0:41 - 0:44
    so we will have to
    begin by removing rows
  • 0:44 - 0:47
    for values where we have
    a missing point.
  • 0:47 - 0:51
    To do this the easiest way,
    we will sort the data,
  • 0:51 - 0:53
    because this will put the
    missing values at the end.
  • 0:53 - 1:02
    So if we go to "data", "sort",
    and "sort first by the pre-column",
  • 1:02 - 1:05
    you can see that now if
    we scroll down to the bottom,
  • 1:05 - 1:07
    the missing data from the
    pre value is at the bottom.
  • 1:08 - 1:11
    So we will highlight that row,
    right-click, and delete.
  • 1:13 - 1:15
    Then we will repeat this
    for the post.
  • 1:15 - 1:22
    I'll highlight both columns,
    sort, and sort by post,
  • 1:22 - 1:25
    scrolling down again,
    you can see
  • 1:25 - 1:26
    we have several missing
    values here,
  • 1:26 - 1:31
    so I'll highlight all
    of those rows, and delete them.
  • 1:32 - 1:35
    Now that we have the same
    number of values in both columns,
  • 1:35 - 1:37
    we can conduct our test.
  • 1:37 - 1:39
    To do this we will use the
    Data Analysis Tool Pack,
  • 1:42 - 1:46
    and we will under the menu,
    find the t-test,
  • 1:46 - 1:49
    paired two sample for means,
    and click "OK".
  • 1:50 - 1:55
    In this test, Excel subtracts
    whatever you have as variable one,
  • 1:55 - 1:57
    minus variable two.
  • 1:57 - 2:00
    So in this case I'm going to
    go ahead and select
  • 2:00 - 2:05
    my post column as variable one,
    and my pre column as variable two.
  • 2:06 - 2:09
    You can do either order just be
    sure you are consistent
  • 2:09 - 2:10
    throughout your test.
  • 2:10 - 2:13
    Since I have labels here,
    I will check the box,
  • 2:13 - 2:15
    because it says stat
    pre and post,
  • 2:15 - 2:17
    and I selected them.
  • 2:17 - 2:20
    I'll leave my alpha level
    At .05,
  • 2:20 - 2:21
    you don't have
    to put anything
  • 2:21 - 2:23
    in the "hypothesized
    mean difference" box,
  • 2:23 - 2:26
    because it will default to zero
    which is what we want.
  • 2:26 - 2:30
    And then I will select
    an output range,
  • 2:30 - 2:32
    that is near where
    my data is,
  • 2:32 - 2:33
    and then click "OK".
  • 2:36 - 2:40
    You can see here that
    the means for both of my groups,
  • 2:40 - 2:47
    are 6.90 and 5.59,
    and when it was subtracted again,
  • 2:47 - 2:51
    Excel subtracted in the order
    of my first variable, minus my second.
  • 2:51 - 2:53
    Since we had a larger
    value first,
  • 2:53 - 2:57
    that led us to a
    positive t-statistic of 4.17.
  • 2:57 - 3:01
    Then you can see here
    it's given us our critical values,
  • 3:01 - 3:04
    and our p-values for our
    one and two tailed tests.
  • 3:05 - 3:08
    Note that it says "E" here.
  • 3:08 - 3:13
    That means that this is
    actually 8.76 times ten
  • 3:13 - 3:14
    to the negative fifth.
  • 3:14 - 3:22
    Or .00009 as our p value
    for the two tailed test.
  • 3:22 - 3:25
    Look to the appropriate
    p-value for your test.
  • 3:25 - 3:29
    If we want a confidence interval
    on this test,
  • 3:29 - 3:31
    we will need to first
    create a new column.
  • 3:31 - 3:34
    Remember a paired test
    is the test of the differences,
  • 3:34 - 3:37
    so we will need to create
    a difference column.
  • 3:38 - 3:41
    I will subtract in the same order
    I did in my test.
  • 3:41 - 3:46
    So I will type in the first
    box 'equals' the' post score',
  • 3:46 - 3:48
    minus the 'pre'.
  • 3:50 - 3:52
    And then I will copy this
    all the way down,
  • 3:52 - 3:55
    by hovering over the corner
    and double clicking.
  • 3:56 - 4:00
    Now that have my difference
    scores for each sample,
  • 4:00 - 4:06
    I will highlight that column,
    go to "Data Analysis",
  • 4:06 - 4:09
    and this time I will select
    "Descriptive Statistics",
  • 4:09 - 4:10
    and click "OK".
  • 4:11 - 4:16
    My input range is the difference
    column, I still have labels.
  • 4:17 - 4:20
    I'll select a new location
    for my output range,
  • 4:22 - 4:25
    and then I am going to
    request the summary statistics,
  • 4:25 - 4:28
    and the confidence level for mean.
  • 4:28 - 4:32
    And I'm going to connect
    a 95% confidence interval,
  • 4:32 - 4:35
    so I will leave it at 95%,
    and then click "OK".
  • 4:36 - 4:41
    You can see here now it's
    given us the mean of the differences,
  • 4:41 - 4:42
    which will be equal to
    what we would get
  • 4:42 - 4:45
    if we subtracted these
    two means up here.
  • 4:46 - 4:49
    This confidence level is the
    calculated margin of error.
  • 4:49 - 4:52
    It's already done all
    of the work for us,
  • 4:52 - 4:56
    so we just have to calculate our lower
    and upper confidence interval values.
  • 4:56 - 4:59
    So I'm going to label my
    lower confidence interval,
  • 4:59 - 5:02
    and my upper confidence interval.
  • 5:02 - 5:05
    And to get these, we
    just take our,
  • 5:05 - 5:07
    mean of the difference.
  • 5:07 - 5:08
    And to get the lower,
  • 5:08 - 5:11
    we will subtract our margin of error.
  • 5:12 - 5:14
    For the upper, we take
    our mean again,
  • 5:14 - 5:17
    and we will add our
    margin of error.
  • 5:19 - 5:21
    So you can see our
    confidence interval
  • 5:21 - 5:26
    is between .68 and 1.93.
  • 5:26 - 5:28
    Since zero is not in
    our confidence interval,
  • 5:28 - 5:31
    this indicates there is a
    difference between
  • 5:31 - 5:34
    our pre and post scores.
  • 5:34 - 5:37
    Which you can see if we look
    at the two tail results here,
  • 5:37 - 5:40
    that also indicates
    this small p-value
  • 5:40 - 5:44
    that there is a significant difference
    between our pre and post scores.
Title:
Paired t-test with Confidence Intervals in Excel 2016
Video Language:
English
Duration:
05:52

English subtitles

Revisions