Welcome to our community

Be a part of something great, join today!

[SOLVED] Hypothesis testing - Winning a game

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Hey!! :eek:

A and B play 100 games of squash; A wins E times. B claims that both of them have the same probability of winning a game.
We consider that the games are independent.

(a) Formulate the null hypothesis and the alternative hypothesis.
(b) For which values of $E$ will the null hypothesis be rejected with $\alpha=1\%$ and for which with $\alpha=5\%$ ?


Is at (a) the null hypothesis $H_0: \ p=\frac{1}{2}$ and the alterinative hypothesis $H_1: \ p\neq \frac{1}{2} $ ? Or do we call $p_A$ the probability of $A$ and $p_B$ the probability of $B$, and so the null hypothesis is $H_0: \ p_A=p_B$ and the alterinative hypothesis $H_1: \ p\_A\neq p_B $ ? (Wondering)
 

Jameson

Administrator
Staff member
Jan 26, 2012
4,029
Hey mathmari,

I would use the second way to frame this.

This link should be useful for comparing two samples of proportions.

[EDIT] - Not a two sample question, please read below.
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
I would use the second way to frame this.

This link should be useful for comparing two samples of proportions.
So, we have the following:
$$H_0: \ p_A-p_B=0 \ \ \text{ and } \ \ H_1: \ p_A-p_B\neq 0$$

The test statistic is given by the formula $$Z=\frac{\hat{p}_A-\hat{p}_B}{\sqrt{\hat{p}(1-\hat{p})\left (\frac{1}{n_A}+\frac{1}{n_B}\right )}}$$

Is the size of the first population equal to the size of the second one, equal to $100$, i.e. $n_A=n_B=100$ ?

If yes, then we have that $\hat{p}_A=\frac{E}{100}$ and $\hat{p}_B=\frac{100-E}{100}$, or not?

Does it then hold that $\hat{p}=\hat{p}_A+\hat{p}_B=\frac{E}{100}+\frac{100-E}{100}=1$ ?

(Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,684
So, we have the following:
$$H_0: \ p_A-p_B=0 \ \ \text{ and } \ \ H_1: \ p_A-p_B\neq 0$$

The test statistic is given by the formula $$Z=\frac{\hat{p}_A-\hat{p}_B}{\sqrt{\hat{p}(1-\hat{p})\left (\frac{1}{n_A}+\frac{1}{n_B}\right )}}$$

Is the size of the first population equal to the size of the second one, equal to $100$, i.e. $n_A=n_B=100$ ?

If yes, then we have that $\hat{p}_A=\frac{E}{100}$ and $\hat{p}_B=\frac{100-E}{100}$, or not?

Does it then hold that $\hat{p}=\hat{p}_A+\hat{p}_B=\frac{E}{100}+\frac{100-E}{100}=1$ ?
Hey mathmari !!

We only have 1 sample with $n=100$, so we can't do a 2-sample test of independent samples can we? (Wondering)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
We only have 1 sample with $n=100$, so we can't do a 2-sample test of independent samples can we? (Wondering)
Oh yes. So we cannot apply the formula of the above link, can we? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,684
Oh yes. So we cannot apply the formula of the above link, can we?
Indeed. We need a different formula for a 1-sample proportion test.
It also means that we should have a hypothesis about a single proportion. (Thinking)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Indeed. We need a different formula for a 1-sample proportion test.
It also means that we should have a hypothesis about a single proportion. (Thinking)
So do we have the null hypothesis $H_0: p=\frac{1}{2}$ and the alternative hypothesis is $p\neq \frac{1}{2}$, or how do we formulate these hypotheses?

If we have these hypotheses, we get the following:

The test statistic is $$Z=\frac{\hat{p}-p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}=\frac{\frac{E}{100}-\frac{1}{2}}{\sqrt{\frac{\frac{1}{2}\left (1-\frac{1}{2}\right )}{n}}}=\frac{\frac{E}{100}-\frac{1}{2}}{\sqrt{\frac{1}{4n}}}=\frac{\frac{E-50}{100}}{\frac{1}{2\sqrt{n}}}=\frac{(E-50)\sqrt{n}}{50}$$

Now we have to compare this with $z_{1-\alpha/2}$, or not? (Wondering)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,684
All correct.
And we can already fill in n=100. Can't we? (Wondering)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004

Jameson

Administrator
Staff member
Jan 26, 2012
4,029
Oh yes. So we cannot apply the formula of the above link, can we? (Wondering)
Sorry mathmari! I quickly read the question and saw that you were formulating a two sample question but I didn't catch that it could be condensed into a one sample question. I'm glad ILS caught that and you solved the problem.
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,004
Sorry mathmari! I quickly read the question and saw that you were formulating a two sample question but I didn't catch that it could be condensed into a one sample question. I'm glad ILS caught that and you solved the problem.
No problem! Thank you!! (Smile)