Welcome to Hypothetest, an interactive storyline generator for hypothesis tests! Together, we will turn your seemingly-static problem into an everly-dynamic solution!

Take a look at your problem. Tell me, how many populations are we examining?

Take a look at your problem. Tell me, how many populations are we examining?

Two!

I'm sorry, but the one-sample tests are not quite ready yet! Come back soon, and while you're waiting, make sure to check out the two sample tests!

Perfect, let's begin our story.

The first population is called

and the second population is called

Perfect, let's begin our story.

The first population is called

Population 1

and the second population is called

Population 2

In each population, the quantity of

is being measured.

In each population, the quantity of

fruit

is being measured.

Perfect, let's begin our story.

The population is called

And in the population, the quantity of

is being measured.

Perfect, let's begin our story.

The population is called

Population 1

And in the population, the quantity of

fruit

is being measured.

In the problem, someone

is concerned with a statistic regarding the quantity of fruit in each population. The statistic is the

In the problem, someone

Bob

is concerned with a statistic regarding the quantity of fruit in each population. The statistic is the

Mean

Now, Bob suspects that the means of each population are equal to each other. However, Bob wants to see if they can gather enough statistical evidence to show that mean of population 1 is in fact

than the mean of population 2, with a significance level of

Now, Bob suspects that the means of each population are equal to each other. However, Bob wants to see if they can gather enough statistical evidence to show that mean of population 1 is in fact

different

than the mean of population 2, with a significance level of

\(\alpha = \)

This is where they need our help!

First, it is worth noting that Bob

know the variance for each population.

This is where they need our help!

First, it is worth noting that Bob

does

know the variance for each population.

The variance for population1 is

and the variance for population2 is

The variance for population1 is

\(\sigma_{1}^{2} = \) 10.1

and the variance for population2 is

\(\sigma_{2}^{2} = \) 14.3

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

and the sample of population2 has size

In these observations, Bob found that the sample mean of population1 is

and the sample mean of population2 is

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

\(n_{1} = \) 30

and the sample of population2 has size

\(n_{2} = \) 30

In these observations, Bob found that the sample mean of population1 is

\(\overline{x}_{1} = \) 30

and the sample mean of population2 is

\(\overline{x}_{2} = \) 30

This is where they need our help!

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

and the sample of population2 has size

In these observations, Bob found that the sample variance of fruit in pop1 is

and the sample variance of fruit in pop2 is

This is where they need our help!

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

\(n_{1} = \) 99

and the sample of population2 has size

\(n_{2} = \) 99

In these observations, Bob found that the sample variance of fruit in pop1 is

\(s_{1}^{2} = \) 99

and the sample variance of fruit in pop2 is

\(s_{2}^{2} = \) 99

This is where they need our help!

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

and the sample of population2 has size

In these observations, Bob found that the sample proportion of fruit in pop1 is

and the sample proportion of fruit in pop2 is

This is where they need our help!

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

\(n_{1} = \) 30

and the sample of population2 has size

\(n_{2} = \) 30

In these observations, Bob found that the sample proportion of fruit in pop1 is

\(\hat{p}_{1} = \) 30

and the sample proportion of fruit in pop2 is

\(\hat{p}_{2} = \) 30

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

and the sample of population2 has size

In their observation of pop1, Bob found that the sample mean quantity of fruit is

and the sample variance of fruit is

In their observation of pop2, Bob found that the sample mean quantity of fruit is

and the sample variance of fruit is

In their endeavor, Bob collected one sample for each population. The sample of population1 has size

\(n_{1} = \) 30

and the sample of population2 has size

\(n_{2} = \) 30

In their observation of pop1, Bob found that the sample mean quantity of fruit is

\(\overline{x}_{1} = \) 30

and the sample variance of fruit is

\(s_{1}^{2} = \) 30

In their observation of pop2, Bob found that the sample mean quantity of fruit is

\(\overline{x}_{2} = \) 30

and the sample variance of fruit is

\(s_{2}^{2} = \) 30

This is where they need our help!

In their endeavor, Bob made

paired observations, and recorded each pair's difference.

Specifically, two dependent observations, one from pop1 and the other from pop2, were paired together, and the difference in quantity was recorded. This process was repeated \(n\) times.

The sample mean of the observed differences turned out to be

and the sample standard deviation of the observed differences turned out to be

This is where they need our help!

In their endeavor, Bob made

\(n = \) 30

paired observations, and recorded each pair's difference.

Specifically, two dependent observations, one from pop1 and the other from pop2, were paired together, and the difference in quantity was recorded. This process was repeated \(n\) times.

The sample mean of the observed differences turned out to be

\(\overline{d} = \) 30

and the sample standard deviation of the observed differences turned out to be

\(s_{d} = \) 30

From the context of the problem, we

of our population variances.

From the context of the problem, we

.

Note: Since we cannot assume anything from the context of the problem, we must perform a test on the equality of population variances.

In summary, we failed to find evidence suggesting that \(\sigma_{1} \neq \sigma_{2}\), therefore we will assume that \(\sigma_{1} = \sigma_{2}\). This is the pooled case, and we proceed as planned.

This is where we begin our hypothesis test!

Specifically, we will perfom the [TEST_NAME].

To do so, we will assume that the [POP1_UNIT] is equal to the [POP2_UNIT]. We call this the null hypothesis, denoted by

[NULL_HYP]

Under this assumption, we will make inferences with [CONF_EQUATION] confidence, and if we arrive at a contradiction, we can reject our null hypothesis in favor of the alternative hypothesis: the [POP1_UNIT] is [BRANCH] than the [POP2_UNIT], denoted by

[ALT_HYP]

However, if we can't find a contradiction, then we can't reject the null hypothesis!

Let's proceed as planned.

Under our assumption, we are supposing that the difference in mean of each population is 0. That is, \(\mu_{1} - \mu_{2} = 0\).

From this, we can conclude something very important. If we treat the previously-defined statistics \(\overline{X}_{1}, \overline{X}_{2}, N_{1}, N_{2}\) as random variables (i.e. they can be ANY value, and the following conclusion will hold), and define another random variable \( Z_{0} \), called the test statistic, to be

$$Z_{0} = \frac{\overline{X}_{1} - \overline{X}_{2}}{\sqrt{\frac{\sigma_{1}^{2}}{N_{1}} + \frac{\sigma_{2}^{2}}{N_{2}}}}$$

Then the probability density function (pdf) of \(Z_{0}\) is the standard normal distribution, denoted by \( Z_{0} \sim N(0,1) \).

If you have a hard time understanding this conclusion, don't worry; the derivation is beyond the scope of introductory hypothesis testing, so for now, it's more important to understand what we do with this conclusion!

Why is this an important conclusion?

Well, knowing that \( Z_{0} \sim N(0,1) \) allows us to find the 95% two-tailed confidence interval, namely \([L,U]\), of \(Z_{0}\)'s pdf. Then we will be 95% confident that any observed test statistic will fall between the values \(L\) and \(U\), which gives us important insight into which kinds of test statistic values we should be expecting to observe from our samples!

This will be clearer in a moment. But first, let us calculate \(L\) and \(U\).

To find the \(100(1 - \alpha) \% \) two-tailed confidence interval of \(N(0,1)\), we have

$$L = \text{invNorm}(\alpha / 2)$$ $$U = -\text{invNorm}(\alpha / 2)$$

Since \(\alpha = 0.05 \), we then calculate

$$L = \text{invNorm}(0.05 / 2) = -1.96$$ $$U = -\text{invNorm}(0.05 / 2) = 1.96$$

Great. To recap, we are 95% confident that under our original assumption, any observed test statistic would fall between -1.96 and 1.96.

So far, we have strictly spoken from a hypothetical standpoint:

"If we were to make to make an observation, then the test statistic should fall in our confidence interval 95% of the time"

However, recall that Bob made an observation for us! We can use this to test the strength of our null hypothesis!

Remember that Bob observed the following statistics:

$$n_{1} = 10$$ $$n_{2} = 14$$ $$\overline{x}_{1} = 78.3$$ $$\overline{x}_{2} = 75.1$$

Then the observed test statistic would be

$$\begin{align} z_{0} = & \frac{\overline{x}_{1} - \overline{x}_{2}}{\sqrt{\frac{\sigma_{1}^{2}}{n_{1}} + \frac{\sigma_{2}^{2}}{n_{2}}}} \\\\ = & \frac{78.3 - 75.1}{\sqrt{\frac{5.5}{10} + \frac{6.8}{14}}} \\\\ = & 3.14 \end{align}$$

Take a look at the following graph.

As you can see, our observed test statistic (\(z_{0}\)) falls outside of our confidence interval, even though we were 95% sure it would've fallen inside!

This is the contradiction we were looking for to reject our null hypothesis!

Finally, we can verify our findings with a more common but less intuitive method.

In this, we will calculate a statistic called the p-value (\(p\)), and compare it to \(\alpha\).

The comparison is simple. If \(p < \alpha\), then we reject the null hypothesis. Otherwise, we cannot reject.

Let's calculate!

The p-value, in this situation, is defined as follows

$$p = 2(1 - \phi(z_{0}))$$

Then we have

$$\begin{align} p = & \text{ } 2(1 - \phi(3.14)) \\\\ = & \text{ } 0.03 \end{align}$$

Since \(p < \alpha = 0.05\), we reject the null, as expected.

Perfect.

Now we can tell Bob that there is sufficient evidence to suggest pop1 and pop2 produce different mean quantities of fruit.

In summary, we assumed the null hypothesis

$$H_{0}: \mu_{1} = \mu_{2}$$

and found evidence from our observations to reject the null, in favor of the alternative hypothesis

$$H_{1}: \mu_{1} \neq \mu_{2}$$

This concludes our hypothesis test.