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?

- December 16th 2009, 05:51 AMtDMHow 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? - December 16th 2009, 05:19 PMmatheagle
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. - December 17th 2009, 01:27 AMtDM
- December 17th 2009, 07:47 AMmatheagle
once again....what is your sample size?

- December 17th 2009, 07:56 AMtDM
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 |

| . | . | . |

| . | . | . |

| . | . | . |

H1: The treatment has an effect. - December 17th 2009, 07:58 AMmatheagle
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

Then use

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. - December 17th 2009, 08:06 AMtDM
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". - December 17th 2009, 08:11 AMtDM
- December 17th 2009, 08:14 AMmatheagle
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 - December 17th 2009, 08:27 AMtDM
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?