# Inference about two samples

I have two different large samples, one is normally distributed (0,1) and the other one follows a t-distribution (df = 4). Can I compare whether the means or the st. deviations of both samples are the same? I am not sure if I can do this since they have different distributions. If it is possible, how can I do the hypothesis test, I mean, how do I calculate the statistics? Finally, considering it is possible to do this, can I do this using R?

• On what do you want to perform the hypothesis test? The mean? Meanwhile I gave you an answer for the first part of your question. I'll edit it if I can give you an answer on the hypothesis testing too. May 28, 2016 at 17:05

Well if you have large samples you can get the mean and standard deviation for both distributions analytically, since the sample mean and standard deviation will both converge toward their true values. In your case the means will be the same, while the standard deviations will not. The t-distribution has fatter tails than the normal distribution, so it will have a greater variance.

The first sample is drawn from a normal distribution $N(\mu, \sigma^2)$ which has the following PDF:

$$f(x) = \frac{1}{\sigma\sqrt{2\pi} } \; \exp \left ( { -\frac{(x-\mu)^2}{2\sigma^2}} \right )$$

where $\mu$ is the mean and $\sigma$ is the standard deviation. In your case you are considering a standard normal $N(0,1)$ which has a zero mean and a unit variance (and obviously standard deviation).

The second sample is drawn from Student's t-distribution which has the following PDF:

$$f(x) = \frac{\Gamma(\frac{\nu+1}{2})} {\sqrt{\nu\pi}\,\Gamma(\frac{\nu}{2})} \left(1+\frac{x^2}{\nu} \right)^{\!-\frac{\nu+1}{2}}$$

where $\nu$ is the number of degrees of freedom and $\Gamma$ is the gamma function. For a t-distribution:

• the mean is zero if $\nu>1$
• the variance is: $\nu / (\nu - 2)$ if $\nu>2$

So since you have 4 degrees of freedom your sample will have a zero mean and a standard deviation of $\sqrt 2$.

As I stated above you can see that both samples have a zero mean, but the sample sampled from Student's t-distribution has a higher variance/standard deviation.

• I expect that in the question the OP is dealing with the t-distribution being referred to is the whole location-scale family of the $t_4$, not just the standard-$t_4$. May 29, 2016 at 0:45