1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Testing of two means

  1. Sep 18, 2014 #1
    Y: 51 32 30 74 42 35 39 33 55 61
    Y-hat: 49 35 29 72 44 32 38 36 57 60

    Null hypothesis: mean y-hat = mean y
    Alternative hypothesis: not null hypothesis

    So I got as a t test 0 and I was wondering if I did something wrong because I never has this case happened to me.

    ImageUploadedByPhysics Forums1411086256.648360.jpg
  2. jcsd
  3. Sep 18, 2014 #2


    Staff: Mentor

    Assuming all the numbers you show were correct, any value of t such that -2.1 < t < 2.1 would be within the acceptance region (of the null hypothesis). It seems a bit coincidental that the two sample means are equal, but I'm getting the same numbers for the two means and the two sample SDs.
  4. Sep 19, 2014 #3


    User Avatar
    Homework Helper

    The standard deviations are not the same. A question: you call one data set yhat: is that really a second data set or are those predicted values of your original data, as from a regression?
  5. Sep 19, 2014 #4

    They are predicted values from a regression. The thing is that the means are the same giving me a zero t-test. Can that happen? The reason I rejected the null hypothesis is because that is still less than the critical point
  6. Sep 19, 2014 #5


    User Avatar
    Homework Helper

    That will always happen: when you fit a regression line to a set of data you minimize the sum of the squares of the residuals, which is
    \sum (y - \widehat y)^2

    A consequence of that fitting process is that the sum of the residuals is zero - that is,

    \sum (y - \widehat y) = 0

    which means that

    \sum y = \sum \widehat y

    so the means of the original y values and the predicted y values are always the same.

    Edited to add: The comments here apply only when the fitted line includes an intercept. If the line is forced to pass through the origin then the residuals no longer sum to zero and the predicted values and actual values do not have the same mean
    Last edited: Sep 19, 2014
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Testing of two means
  1. F-test / t-test (Replies: 37)