Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Paired two sample t test

  1. Feb 11, 2015 #1
    Hi, physics undergrad here with bad statistics skills!

    I'm working on my 3rd year project and I need to do some statistical analysis. First, I'll paint the scene:

    We have a number of tables, each of 10,000+ sources taken from the space telescope Herschel. They have had their flux measured at two time intervals ~ 8 hours apart. For each source I had flux1, flux2 and each data point has an error. So my table looks like:

    | Flux_1 | Err_1 | Flux_2 | Err_2 |
    (lots of data)

    I need to run a paired two sample t test (I believe) on this data to see if any sources have significant changes in flux over the 8 hour period.

    I've been looking at two sample t tests everywhere and I can't seem to find an example that has errors associated with each value taken.

    I was hoping someone could shine some light on the situation that I'm in. And perhaps drop some hints on how I would implement running the tests on each data point. Excel or Python, maybe something easier?


  2. jcsd
  3. Feb 11, 2015 #2


    User Avatar
    Homework Helper

    It sounds to me like you are looking to conduct 10,000+ independent comparisons.
    H0 : Flux1_i-Flux2_i = 0
    H1 : |Flux1_i - Flux2_i|>0
    If the errors are similar, then it is best to average the error for your test. Assuming your error term is the standard error (S), and based on the same number of observations in the system, then you can use:
    ##S^2_p = \frac{S_1^2 + S_2^2}{2}##
    ##t_0 = \frac{Flux_1 - Flux_2}{\sqrt{S^2_p/2}}##

    The other option would be to ignore the error term and just compare the observations. This might be prudent if the errors are relatively small compared to the observations.
    Doing that would follow the standard process form paired tests, where you are testing the pairwise difference against the mean difference of the total sample.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook