# Help: Making inferences about the null and alternative hypothesis from t-tests

This question is an extension from other questions at Quantile tables and confidence intervals and Quantiles tables and hypothesis testing. This particular question focuses on making inferences about the null and alternative hypothesis from t-tests.

For this study, I would like to statistically test how the total length of sparrows affects their survival. Consider here one of the characteristics of the sparrows recorded was total length, which is assumed to be normally distributed.

Data:

1. In a group of 21 surviving sparrows, the variance of the total length was 11.05 mm2.

2. In a group of 28 sparrows that subsequently died, the variance of the total length was 15.07 mm2.

3. The µ of the total length of sparrows that survived was 157.4 mm2

4. The mean µ of the total length of sparrows that subsequently died was 158.4 mm2

Problems to solve:

I am unsure if I have understood the concepts correctly underpinning how to: -

1. Make inferences from t-tests

If this is possible, I would be incredibly grateful if anyone could please check the answers to the questions stated below by providing advice. Many thanks in advance for your help.

Question

The mean total length of sparrows that survived was 157.4 mm, and the mean total length of sparrows that subsequently died was 158.4 mm. Use a t-test to test the hypothesis that the population mean total length of sparrows does not depend on whether or not the sparrow survived. You should calculate the test statistic and state which distribution this test statistic should be compared with; however, you should be 0.327.

Hypothesis testing:

• H0: Total mean length of Sparrow = Total mean length of sparrow survival
• H1: Total mean length of Sparrow ≠ Total mean length of sparrow survival

The t-distribution is similar to a normal distribution, however, the variance is based on the degrees of freedom.

Definitions:

• Mean Length of Survivors (MLS)
• Mean Length of Non-Survivors (MLNS)

µ of survivors and non-survivors:

• µ1 (MLS) = 157.4 mm2
• µ2 (MLNS) = 158.4 mm2

Variance (S²) of survivors and non-survivors:

• S²(MLNS) =S1= 15.07 mm2
• S² (MLS) = S2= 11.05 mm2

The assumption of equal variances for MLS and MLNS groups of survival

-N1 = number of non-survivors (n=28)

-N2 = number of survivors (n=21)

Calculation of equal variance:

Calculate the combined variance for survivors and non-survivors using a two sample t-test:

SP = (28-1) * 15.07+ (21-1) * 11.05/(28+21-2)

SP = 406.89 + 221.0/47 = 627.89/47

SP = 13.3593617

Calculate two sample t-test:

T = (158.4-157.4)/ 13.3593617 * √1/28 + 1/21

T = 0.2592965

The test statistic should be compared to the F distribution. The null hypothesis has not been rejected showing the mean total length of sparrows does not depend on whether or not the sparrow survived. The p-value is 0.327 which is larger than the significance level of 0.05; therefore, there is little evidence to abandon the null hypothesis

• While you can use the F distribution to obtain P-values from values of t, we would generally use Student's t-distribution directly. Perhaps see this stats.stackexchange.com/questions/160559/… Dec 22, 2016 at 20:56
• I advise that people should always look at the data prior to making inferences on the basis of statistical tests. How large is the difference in length between the dead and living sparrows? Compared to the range of sparrow lengths? Also, consider the mechanistic relationship between the length and death: old sparrows are longer but tend to die. Is a statistical test going to tell you anything useful about that? Dec 22, 2016 at 20:59
• Thank you Michael, your answer and the link is deeply appreciated. The data was not provided, so it was not possible to graphically illustrate the distribution. Dec 22, 2016 at 21:48
• You do have the summary data, so you can see that the mean difference in length is tiny compared to the variability. My point is that the P-value is not a very interesting output for this example. Dec 22, 2016 at 23:09

First, a correction to your formula for $T$, above:

$T=\dfrac{\mu_2 - \mu_1}{\sqrt{S_p} \cdot \sqrt{\frac{1}{n_2}+\frac{1}{n_1}}}$

If you use this formula, the final value of $T=0.9478$.

You can look up this value in a t-distribution table, as suggested by @MichaelLew.

In Stata,

. ttesti 21 158.4 3.324154 28 157.4 3.8820098

Two-sample t test with equal variances
------------------------------------------------------------------------------
|     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
x |      21       158.4    .7253899    3.324154    156.8869    159.9131
y |      28       157.4    .7336309     3.88201    155.8947    158.9053
---------+--------------------------------------------------------------------
combined |      49    157.8286    .5215957     3.65117    156.7798    158.8773
---------+--------------------------------------------------------------------
diff |                   1    1.055121               -1.122629    3.122629
------------------------------------------------------------------------------
diff = mean(x) - mean(y)                                      t =   0.9478
Ho: diff = 0                                     degrees of freedom =       47

Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
Pr(T < t) = 0.8259         Pr(|T| > |t|) = 0.3481          Pr(T > t) = 0.1741


The p-value for the two-sided null-hypothesis is 0.3481.

Good luck!