Testing 2 Means: Got 0 in T-Test - Is Something Wrong?

  • Thread starter Thread starter vanitymdl
  • Start date Start date
  • Tags Tags
    Means Testing
Click For Summary

Homework Help Overview

The discussion revolves around a t-test comparing two sets of data: actual values (Y) and predicted values (Y-hat) from a regression analysis. The original poster expresses confusion over obtaining a t-test result of zero, questioning whether this outcome indicates an error in their calculations.

Discussion Character

  • Exploratory, Assumption checking, Conceptual clarification

Approaches and Questions Raised

  • Participants explore the implications of obtaining equal means for the two datasets and question the nature of the Y-hat values, considering whether they represent a second dataset or predicted values. There is discussion about the relationship between the regression fitting process and the resulting statistics.

Discussion Status

The conversation is ongoing, with some participants providing insights into the properties of regression analysis and its impact on the means of the datasets. There is recognition of the original poster's concerns, but no consensus has been reached regarding the implications of the t-test result.

Contextual Notes

Participants note that the standard deviations of the two datasets are not the same, which may influence the interpretation of the t-test results. The discussion also touches on the conditions under which the means of the actual and predicted values are equal, particularly in relation to whether the regression line includes an intercept.

vanitymdl
Messages
64
Reaction score
0
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
 
Physics news on Phys.org
vanitymdl said:
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.

View attachment 73295
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.
 
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?
 
statdad said:
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?
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
 
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
<br /> \sum (y - \widehat y)^2<br />

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

<br /> \sum (y - \widehat y) = 0<br />

which means that

<br /> \sum y = \sum \widehat y<br />

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:

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K
Replies
26
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 18 ·
Replies
18
Views
15K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K