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

In summary, the conversation revolved around a null hypothesis stating that the mean of predicted values is equal to the mean of actual values, and a question about the validity of a zero t-test result. It was explained that this is expected when fitting a regression line, as the sum of residuals is zero, causing the means to be equal. However, this only holds true when the fitted line includes an intercept, and not when it is forced to pass through the origin.
  • #1
vanitymdl
64
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
  • #2
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.
 
  • #3
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?
 
  • #4
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
 
  • #5
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
[tex]
\sum (y - \widehat y)^2
[/tex]

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

[tex]
\sum (y - \widehat y) = 0
[/tex]

which means that

[tex]
\sum y = \sum \widehat y
[/tex]

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:

1. How do you interpret getting 0 in a T-test for testing 2 means?

Getting 0 in a T-test for testing 2 means means that there is no difference between the means of the two groups being compared. This could be due to chance or sampling error, but it could also indicate that there is truly no difference between the means.

2. What are the potential reasons for getting 0 in a T-test for testing 2 means?

The potential reasons for getting 0 in a T-test for testing 2 means include a small sample size, a weak or nonexistent relationship between the two variables being compared, or a mistake in the data analysis process.

3. How can I ensure the accuracy of my T-test results when testing 2 means?

To ensure the accuracy of T-test results when testing 2 means, it is important to have a large enough sample size, carefully select and measure the variables being compared, and accurately perform the statistical analysis.

4. What should I do if I get 0 in a T-test for testing 2 means?

If you get 0 in a T-test for testing 2 means, you should carefully review your data and the analysis process to ensure there are no mistakes. If everything appears to be correct, it may be necessary to accept that there is no significant difference between the means of the two groups being compared.

5. Can a T-test for testing 2 means still be valid if it results in 0?

Yes, a T-test for testing 2 means can still be valid even if it results in 0. It is important to consider the sample size, the variables being compared, and the overall research question before interpreting the results. In some cases, a 0 result may be valid and provide useful information, while in others it may indicate a need for further research or a different statistical test.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
26
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
Replies
3
Views
2K
  • Programming and Computer Science
Replies
2
Views
308
  • Precalculus Mathematics Homework Help
Replies
2
Views
8K
  • General Discussion
Replies
18
Views
11K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Programming and Computer Science
Replies
19
Views
975
  • Programming and Computer Science
Replies
3
Views
1K
Back
Top