4
$\begingroup$

Given a population (normal distribution) mean and variance and a sample set with n<30 values, how should I perform hypothesis testing. My professor told me that I should be using the t-test for this case.

I believe that I understand why a t-test is used. It is because we are not sure of the distribution that the sample values come from. We want to compare the mean against the normally distributed population.

Typically, this case would require we estimate the variance of the sample when finding the t-value. However, we are given the variance of the population. So should I instead use the given variance for my calculation?

$$ t = \frac{\overline{X}-\mu}{\frac{\sigma}{\sqrt{N}}} $$

EDIT: I wanted to provide an example for clarification.

Company A releases the results of their new printer's performance. These results come from a normal distribution because they are based on averages. $$ \mu_{A} = 40\\ \sigma_{A} = 5 $$

Company B wants to publish their printer results. They take the following 15 samples. $$ B = \{ 25,35,50,20,30,25,30,35,40,45,20,25,30,35,35 \} $$

Calculating the sample mean $\overline{B}$ and sample standard deviation $s_{B}$ is trivial.

Can company B make the claim that their printer performs better than company A?

Since the underlying distribution of $B$ is unknown, does that disqualify the use of the z-test for this problem? If I am to use a t-test, am I using $\sigma_{A}$ or $s_{B}$?

$\endgroup$
  • $\begingroup$ In order to give me a confusing problem to answer :) $\endgroup$ – Alex Nov 20 '14 at 23:29
  • 1
    $\begingroup$ Oh, I got it... a t-test between the two companies' printers. This sounds like a one-sample t-test situation. The parameters of A are known, so you can just use B's sample to compile its mean and 95%CI and see if it includes the mean of A. $\endgroup$ – Penguin_Knight Nov 20 '14 at 23:30
  • $\begingroup$ So do I use the given population standard deviation from A or the calculated sample standard deviation from B? $\endgroup$ – Alex Nov 20 '14 at 23:34
  • 1
    $\begingroup$ I'd use the SD from B, because there is no guarantee that the printers from A and B have the same variation. $\endgroup$ – Penguin_Knight Nov 21 '14 at 0:07
  • $\begingroup$ Printer performance is not normal distributed, and also such large standard deviation is not normal for printer performance. (that is beside the point of the exercise, but I just wanted to mention this, in real life you would not perform a t-test nor z-test because something more strange is going one than simple normal distributed variables) $\endgroup$ – Martijn Weterings Mar 3 at 5:04
5
$\begingroup$

If your distributions are known to be normal, and you have sample mean and standard deviation, you'd use a t-test.

If, however, you know the population standard deviation, then you would instead use that in place of the sample standard deviation, giving a z-test, not a t-test.

However, I have difficulty thinking of many practical situations where you'd know $\sigma$ but not have any information (outside the sample) on $\mu$.

===

Edit:

Given the way the question there is phrased, there's no particular reason to assume $A$'s sd would apply to $B$.

If we treat that $\mu_A$ number as $A$'s population mean (which it isn't, really -- surely it's actually a sample value, even if from a big sample), then we can do a one-sample t-test to decide whether $B$'s population mean differs from 40.

(Arguably, though, it should be a one-tailed test, since the clearly expressed alternative of interest is "better", not "different").

So now looking at the actual question, in the absence of a reason to think that $\sigma_B=5$, I'd agree that you would do a t-test rather than a z-test.

$\endgroup$
  • $\begingroup$ This is the answer I understand. However, the problem we were given specifically states the use of a t-test. It really confuses me. $\endgroup$ – Alex Nov 20 '14 at 0:14
  • 1
    $\begingroup$ It's difficult for me to say what they're thinking there. Perhaps there's something in the problem statement we don't see here, but if not, I'd think they're mistaken. $\endgroup$ – Glen_b Nov 20 '14 at 0:17
  • $\begingroup$ I have added a sample problem to give a better idea of the question that was asked of me. Do you think you could take a look and let me know what you think? $\endgroup$ – Alex Nov 20 '14 at 23:18
  • 1
    $\begingroup$ See my edited answer $\endgroup$ – Glen_b Nov 20 '14 at 23:55
2
$\begingroup$

One sample t-test can be done for this in R as follows:

t.test(sample_data, mu=mu0)

see: http://www.instantr.com/2012/12/29/performing-a-one-sample-t-test-in-r/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.