Results 1 to 10 of 10

Math Help - How does one perform a Paired Sample t-Test with binary data?

  1. #1
    tDM
    tDM is offline
    Newbie
    Joined
    Feb 2009
    Posts
    7

    Question How does one perform a Paired Sample t-Test with binary data?

    I have before and after responses (0 or 1) for each participant and would like to know how to analyze it.
    Is it performed exactly like a normal paired sample t-test or do I need to do something different because the responses are binary?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    binary is Binomial
    Hence you use the Binomial distribution if the sample size is small
    And you can use the normal approximation (Central Limit Theorem) if n is large.
    The t distribution is incorrect.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    tDM
    tDM is offline
    Newbie
    Joined
    Feb 2009
    Posts
    7
    Quote Originally Posted by matheagle View Post
    binary is Binomial
    Hence you use the Binomial distribution if the sample size is small
    And you can use the normal approximation (Central Limit Theorem) if n is large.
    The t distribution is incorrect.
    So which test is it?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    once again....what is your sample size?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    tDM
    tDM is offline
    Newbie
    Joined
    Feb 2009
    Posts
    7
    Around 700, it will vary.

    I know binary is binomial but how do I actually test it?

    Example data:

    Code:
    |Participant | Before | After |
    | 1          |   0    |   1   |
    | 2          |   1    |   1   |
    | 3          |   0    |   0   |
    | 4          |   0    |   1   |
    | 5          |   0    |   0   |
    | 6          |   1    |   1   |
    | 7          |   1    |   1   |
    | .          |   .    |   .   |
    | .          |   .    |   .   |
    | .          |   .    |   .   |
    H0: The treatment has no effect.
    H1: The treatment has an effect.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    USE the normal approximation to the binomial
    It can be found in every undergrad stat book and I'm sure it's online too.
    Gauss proved it 200 years ago.
    It's the most basic CLT.
    -------------------------------------------
    But this seems to be a paired difference test (same person)?
    You have two populations
    Hence you should subtract one set from the other
    and perform a one sample test.
    Are you trying to prove that there is an improvement?

    Let Y_i= X_{i2}-X_{i1}

    Then use S=\sum_{i=1}^n Y_i

    Under the null, S has mean 0.
    Use the CLT, the rejection region is via the normal.

    calculate the variance of S and obtain a test stat.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    tDM
    tDM is offline
    Newbie
    Joined
    Feb 2009
    Posts
    7
    My apologies: I understand that I'm probably quite frustrating but...

    The binomial relies upon me knowing the probability of getting a 0 or 1.

    Put it this way, if the data was numerical (not binary) I would point the enquirer in this direction: Paired Sample T-Test

    This explains how to test the hypothesis and which test statistic to use.

    All you've said so far is "use the normal approximation to the binomial".
    Follow Math Help Forum on Facebook and Google+

  8. #8
    tDM
    tDM is offline
    Newbie
    Joined
    Feb 2009
    Posts
    7
    But this seems to be a paired difference test (same person)?

    That's the title.

    Quote Originally Posted by matheagle View Post
    USE the normal approximation to the binomial
    It can be found in every undergrad stat book and I'm sure it's online too.
    Gauss proved it 200 years ago.
    It's the most basic CLT.
    -------------------------------------------
    But this seems to be a paired difference test (same person)?
    You have two populations
    Hence you should subtract one set from the other
    and perform a one sample test.
    Are you trying to prove that there is an improvement?

    Let Y_i= X_{i2}-X_{i1}

    Then use S=\sum_{i=1}^n Y_i

    Under the null, S has mean 0.
    Use the CLT, the rejection region is via the normal.

    calculate the variance of S and obtain a test stat.
    So it's the same as a regular paired t-test but checked against the normal dist instead of the t-dist?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    the data is dependent and it's not normally distributed
    hence it's not a t
    you either need the exact distribution
    or you use a large sample and approximate with the CLT
    Follow Math Help Forum on Facebook and Google+

  10. #10
    tDM
    tDM is offline
    Newbie
    Joined
    Feb 2009
    Posts
    7
    Ok, ok.

    So the calculation is...?

    "How to do a hypothesis test on a before and after experiment where the responses were binary" in three easy steps...

    Anything?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Paired difference T-Test
    Posted in the Advanced Statistics Forum
    Replies: 15
    Last Post: August 9th 2011, 01:53 PM
  2. One sample t-test CLASHING with paired sample t-test?
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: February 15th 2011, 09:34 PM
  3. Paired t test hypothesis testing
    Posted in the Statistics Forum
    Replies: 1
    Last Post: December 9th 2009, 12:36 AM
  4. paired wilcoxon signed rank test
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: May 3rd 2008, 08:44 PM
  5. paired t test
    Posted in the Statistics Forum
    Replies: 0
    Last Post: May 2nd 2008, 07:35 PM

Search Tags


/mathhelpforum @mathhelpforum