Hypothesis test for the parameter of a geometric distribution

Hypothesis test for the parameter of a geometric distribution

Spec 4.2 · Edexcel A-Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Observe one value of XX, the number of trials to the first success, and test H0:p=p0\mathrm{H}_0:p=p_0.
  • P(X≥x)=(1−p)x−1\mathrm{P}(X\geq x)=(1-p)^{x-1} and P(X≤x)=1−(1−p)x\mathrm{P}(X\leq x)=1-(1-p)^x: no tables needed.
  • A larger pp means a shorter wait: H1:p<p0\mathrm{H}_1:p<p_0 uses P(X≥x)\mathrm{P}(X\geq x); H1:p>p0\mathrm{H}_1:p>p_0 uses P(X≤x)\mathrm{P}(X\leq x).
  • Solve critical regions with logarithms, reversing the inequality when dividing by ln⁡(1−p0)<0\ln(1-p_0)<0.
  • The test assumes independent trials with constant pp, and one value gives a fairly weak test.

The geometric test

You observe one value of XX and decide whether it is surprising if pp has its stated value.

A geometric distribution X∼Geo(p)X\sim\mathrm{Geo}(p) counts the independent trials up to and including the first success.

In a hypothesis test for pp, you observe one value of XX, the test statistic, and decide whether it is surprising if pp has its stated value.

Tail probabilities need a single power, with no tables. Remember a larger pp makes XX smaller: a small observed xx is evidence that pp is higher, and a large xx evidence that pp is lower.

00.050.10.150.212345678x (trial of first success)P(X = x)
P(X = x) for X ~ Geo(0.2): the first success is most likely on trial 1, then probabilities fall.
  • P(X=x)\mathrm{P}(X=x)p(1−p)x−1p(1-p)^{x-1}
  • P(X≥x)\mathrm{P}(X\geq x)(1−p)x−1(1-p)^{x-1}
  • P(X≤x)\mathrm{P}(X\leq x)1−(1−p)x1-(1-p)^x

For X∼Geo(0.5)X\sim\mathrm{Geo}(0.5), what is P(X≥4)\mathrm{P}(X\geq4)?

Stating the hypotheses

Write H0:p=p0\mathrm{H}_0:p=p_0 and an alternative about the parameter pp, never about XX.

The null hypothesis is H0:p=p0\mathrm{H}_0:p=p_0, where p0p_0 is the stated probability. The alternative hypothesis is H1:p<p0\mathrm{H}_1:p<p_0, p>p0p>p_0 or p≠p0p\neq p_0, depending on the suspicion described.

Define pp in context, for example "the probability that a card wins a prize". Then state that under H0\mathrm{H}_0, X∼Geo(p0)X\sim\mathrm{Geo}(p_0).

Writing H0:X=12\mathrm{H}_0:X=12 is a common error: the hypotheses concern the parameter pp, while 1212 is the observed value.

00.10.20.30.40.50.60.70.80.91p₀ = 0.3

p lower

  • H1:p<p0\mathrm{H}_1:p<p_0
  • One-tailed
  • Expect a longer wait

p higher

  • H1:p>p0\mathrm{H}_1:p>p_0
  • One-tailed
  • Expect a shorter wait

p different

  • H1:p≠p0\mathrm{H}_1:p\neq p_0
  • Two-tailed

A game claims a 20%20\% chance of winning. A player thinks it is lower. Which alternative hypothesis is correct?

One-tailed tests

Choose the tail by asking which direction is "more extreme", then compare with the significance level.

Assume H0\mathrm{H}_0 is true. Find the probability of a result at least as extreme as the observed xx and compare it with the significance level.

For H1:p<p0\mathrm{H}_1:p<p_0 a lower pp means a longer wait, so use P(X≥x)=(1−p0)x−1\mathrm{P}(X\geq x)=(1-p_0)^{x-1}. For H1:p>p0\mathrm{H}_1:p>p_0 a higher pp means a shorter wait, so use P(X≤x)=1−(1−p0)x\mathrm{P}(X\leq x)=1-(1-p_0)^x.

2468101214160.20.40.60.81xy(1, 1)(15, 0.044)P(X ≥ x)5% level
P(X ≥ x) = 0.8^(x−1) for p₀ = 0.2 against the 5% level: it first drops below 0.05 at x = 15.

H1:p<p0\mathrm{H}_1:p<p_0

  • Longer wait is extreme
  • P(X≥x)=(1−p0)x−1\mathrm{P}(X\geq x)=(1-p_0)^{x-1}

H1:p>p0\mathrm{H}_1:p>p_0

  • Shorter wait is extreme
  • P(X≤x)=1−(1−p0)x\mathrm{P}(X\leq x)=1-(1-p_0)^x

Worked example

A card game claims p=0.2p=0.2 of winning a prize. The first prize comes on card 1212. Test at the 5%5\% level whether pp is less than 0.20.2.

Worked example

A screen is defective with probability 0.020.02. The first defective screen is the 22nd tested. Test at the 5%5\% level whether pp is greater than 0.020.02.

H1:p>p0\mathrm{H}_1:p>p_0 and the first success is on trial xx. Which probability do you compare with the significance level?

Critical regions

Solve the tail inequality with logarithms, round to a whole number and check the neighbouring values.

The critical region is the set of values of XX that lead to rejecting H0\mathrm{H}_0.

For H1:p<p0\mathrm{H}_1:p<p_0 it has the form X≥cX\geq c, where cc is the smallest value with (1−p0)c−1≤(1-p_0)^{c-1}\leq the significance level. Solve with logarithms, reversing the inequality because ln⁡(1−p0)<0\ln(1-p_0)<0. Then check the neighbouring values.

For H1:p>p0\mathrm{H}_1:p>p_0 it has the form X≤cX\leq c with 1−(1−p0)c<0.051-(1-p_0)^c<0.05. For p0=0.02p_0=0.02 this gives X≤2X\leq2, since 1−0.983=0.0588>0.051-0.98^3=0.0588>0.05.

The actual significance level is the probability of the critical region under H0\mathrm{H}_0.

00.020.040.060.081234xP(X ≤ x)
P(X ≤ x) = 1 − 0.98^x for p₀ = 0.02. Only x = 1 and 2 are below 0.05, so the critical region is X ≤ 2.
  • H1:p<p0\mathrm{H}_1:p<p_0X≥cX\geq c, with (1−p0)c−1<α(1-p_0)^{c-1}<\alpha
  • H1:p>p0\mathrm{H}_1:p>p_0X≤cX\leq c, with 1−(1−p0)c<α1-(1-p_0)^c<\alpha

Worked example

X∼Geo(0.1)X\sim\mathrm{Geo}(0.1) under H0\mathrm{H}_0 and H1:p<0.1\mathrm{H}_1:p<0.1 at the 5%5\% level. Find the critical region and the actual significance level.

For H1:p>0.02\mathrm{H}_1:p>0.02 at 5%5\%, 1−0.983=0.05881-0.98^3=0.0588. Is X=3X=3 in the critical region?

Two-tailed tests

Put half the significance level in each tail and check each tail separately.

For H1:p≠p0\mathrm{H}_1:p\neq p_0, put half the significance level in each tail. At 10%10\% use 5%5\% in each tail.

  • Lower tail X≤aX\leq a: 1−(1−p0)a≤0.051-(1-p_0)^a\leq0.05.
  • Upper tail X≥bX\geq b: (1−p0)b−1≤0.05(1-p_0)^{b-1}\leq0.05.

Check each tail separately, and say clearly if one of them is empty.

2468101214160.10.20.30.40.50.6xy(1, 0.2)(15, 0.044)P(X ≤ x)P(X ≥ x)5% in each tail
p₀ = 0.2 at 10% two-tailed. Lower tail P(X ≤ x) is already above 0.05 at x = 1, so it is empty. Upper tail: X ≥ 15.

Lower tail

  • X≤aX\leq a
  • 1−(1−p0)a≤0.051-(1-p_0)^a\leq0.05

Upper tail

  • X≥bX\geq b
  • (1−p0)b−1≤0.05(1-p_0)^{b-1}\leq0.05

Worked example

X∼Geo(0.3)X\sim\mathrm{Geo}(0.3) under H0\mathrm{H}_0 and H1:p≠0.3\mathrm{H}_1:p\neq0.3 at the 10%10\% level. Find the critical region.

In the example above, why is there no lower critical region?

Conclusions and assumptions

State whether H0\mathrm{H}_0 is rejected, then conclude in context, and comment on independence and constant pp.

State whether H0\mathrm{H}_0 is rejected, then give a conclusion in context: "There is sufficient evidence, at the 5%5\% level, that the probability of a defective screen is greater than 0.020.02." If H0\mathrm{H}_0 is not rejected, say there is insufficient evidence against the claim. Never say a claim is proved or disproved.

The test relies on independent trials with a constant probability of success. If the probability changes, for example because a player improves with practice, the geometric model is not suitable.

A test based on a single observed value is also fairly weak.

  1. 1

    Hypotheses

    State H0:p=p0\mathrm{H}_0:p=p_0 and H1\mathrm{H}_1 in context

  2. 2

    Distribution

    Write X∼Geo(p0)X\sim\mathrm{Geo}(p_0) under H0\mathrm{H}_0

  3. 3

    Direction

    Decide which tail is extreme

  4. 4

    Probability

    Use a single power, no tables

  5. 5

    Conclude

    Reject or not, then a sentence in context

Geometric hypothesis test.

Which assumption is needed for the geometric model?

Try an exam question

A game claims that each play wins with probability 0.30.3, independently. A player thinks the probability is lower. The player's first win comes on the 1010th play. Test the claim at the 5%5\% significance level.

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which of the following gives the correct hypotheses, where pp is the probability that a card wins a prize?

1 mark, marked against the mark scheme

Revision notes