Question A

Identify the most prevalent sources of sampling bias in the following scenarios:

  1. A journalist would like to know how long patients are waiting at A&E at the Heath Hospital. She visits the A&E at random times during the week and asks all everyone in the waiting room how long they have been waiting for.

    SOLUTION: There is inspection bias here. The longer patients wait at A&E, the more likely they are to be part of the sample. Therefore the attribute she is recording (waiting time) also affects how likely they are to be in the sample.

  2. A YouTuber would like to know how to improve his videos, so he sends a link to an online poll to all his subscribers.

    SOLUTION: There are a number of biases here, volunteer response bias as answering the poll is a voluntary act, response medium bias as only those with a computer can answer, etc. However the most prevalent here is situational bias, as he is only asking those who already subscribe to his channel for their opinions, and so is losing out on those who do not like his videos enough to subscribe.

  3. Spotify would like to know which decade has the most popular music, and so look at the number of streams of all the songs on their platform.

    SOLUTION: Again there are a number of biases here, but the most prevalent is survivorship bias, as for earlier decades, only the most popular music will have survived and been included on their platform, while for modern music they will have most music on their platform.


Question B

For the following scenarios identify the most appropriate hypothesis test and state whether it would be one-tailed or two-tailed?

  1. An ornithologist would like to know if bald eagles have a wider average wingspan than hawk eagles. The wingspans of 22 bald eagles and 20 hawk eagles are measured.

    SOLUTION: Two sample \(t\)-test. One-tailed test.

  2. An American president claims that American schoolchildren have an average of IQ of 133. A news company wishes to verify this claim, and measures the IQ of a sample of 200 American schoolchildren.

    SOLUTION: One sample \(t\)-test. Two-tailed test.

  3. A telephone company would like to know if wireless or wired internet provides speedier connection. Wired and wireless speeds are measured for 50 devices at the same property.

    SOLUTION: Paired sample \(t\)-test. Two-tailed test.

  4. A paediatrician would like to know if children develop the ability to click their fingers in their dominant hand quicker than the other. The age at which finger clicking is mastered in each hand is measures in a sample of 26 children.

    SOLUTION: Paired sample \(t\)-test. One-tailed test.

  5. A journalist is investigating unconscious bias at the BRIT awards and wants to know if red haired nominees win awards less often once nominated. All previous nominees considered, and their hair colour and outcome recorded.

    SOLUTION: No test required, the journalist has not taken a sample, they have the whole population.

  6. A company would like to know if male employees reach top management more frequently than female employees. A random sample of 52 employees is taken, their gender and management level recorded.

    SOLUTION: \(\chi^2\)-test of independence. Always a one-tailed test.

  7. A drug company would like to know if a new drug has any adverse effects on heart rate. A trial involving 38 patients is undertaken; their heart rates are recorded before and after administering the drug.

    SOLUTION: Paired sample \(t\)-test. Two tailed-test.

  8. A botanist would like to know if yellow flowers are more likely to get black spot disease than blue ones. Colour and disease status are recorded for a sample of 105 flowers.

    SOLUTION: \(\chi^2\)-test of independence. Always a one-tailed test.

  9. A historian would like to know if ancient Celts had the same average height as ancient Egyptians. 12 Celtic and 17 Egyptian skeletons were measured.

    SOLUTION: Two sample \(t\)-test. Two-tailed test.

  10. A psychologist would like to know if a course on intense speech therapy affects the vocabulary of Arabic and French speakers differently. The vocabularies of 40 speakers of each language are recorded before and after the course.

SOLUTION: Two sample \(t\)-test. Two-tailed test. (Not a paired test, we are testing the difference in the increase between two independent groups, not the increase itself.)


Question C

It is feared that a lake in Canada is being contaminated by a nearby factory. Eight pH samples are taken with the following results:

\[{5.4, 3.3, 5.4, 5.8, 7.4, 6.1, 6.6, 4.0, 3.9}\]

Environmentalists need to be 90% confident that the average pH of the lake is more acidic (lower pH) than pure water (with a pH of 7). Perform an appropriate hypothesis test.

SOLUTION: Perform a one sample \(t\)-test. \(H_0\): \(\mu = 7\). \(H_1\): \(\mu < 7\). One tailed. We obtain a \(p\)-value of 0.002941 which is less than 0.1, and so we can reject the null hypothesis and accept the alternative, and say that the mean pH of the lake is acidic.


Question D

In order to test the truth of Aesop’s fable, a group of philosophy students set up a race between 7 tortoises and 7 hares. The results are:

  • 1st - Tortoise
  • 2nd - Hare
  • 3rd - Tortoise
  • 4th - Tortoise
  • 5th - Hare
  • 6th - Hare
  • 7th - Tortoise
  • 8th - Tortoise
  • 9th - Tortoise
  • 10th - Hare
  • 11th - Tortoise
  • 12th - Hare
  • 13th - Hare
  • 14th - Hare

Perform a hypothesis test at the 95% confidence level to check whether slow and steady really does win the race.

SOLUTION: Perform a Mann-Whitney test on the positions. We have tortoise positions \(\{1, 3, 4, 7, 8, 9, 11\}\) and hare positions \(\{2, 5, 6, 10, 12, 13, 14\}\). \(H_0\): \(m_{\text{Tortoise}} = m_{\text{Hare}}\). \(H_1\): \(m_{\text{Tortoise}} < m_{\text{Hare}}\). One tailed, and choose a confident level of 90%. We obtain a test statistic of 15, and the critical value of the test statistic at 95% confidence is 11. As the test statistic is not less than its critical value, we cannot reject the null hypothesis, and say that we have no evidence to say that the distributions of positions of tortoise and hare are not the same.


Question E

The salaries of a selection of Chemistry graduates from the United Kingdom and from France are shown below:

  • UK: \({£21700, £29450, £20800, £32100, £25550, £27400, £22000, £21250, £26000}\)
  • France: \({€30600, €33630, €31200, €28500, €34600, €31750, €36950}\)

At the time the exchange rate was £1 = €1.21.

University administrators want to be 90% confident that French graduates and British graduates earn different mean salaries. Perform an appropriate hypothesis test.

SOLUTION: Perform a two sample \(t\)-test (but first need to convert to the same currency). \(H_0\): \(\mu_{\text{UK}} = \mu_{\text{France}}\). \(H_1\): \(\mu_{\text{UK}} \neq \mu_{\text{France}}\). Two tailed. We obtain a \(p\)-value of 0.169946 which is not less than \(\frac{0.1}{2}=0.05\), and so we cannot reject the null hypothesis, so we cannot be 90% confident that they earn different amounts.


Question F

The contingency table below shows the number of survivors and fatalities on the Titanic, by class.

  1st 2nd 3rd Crew
Survived 203 118 178 212
Perished 122 167 528 673

Are class and survival status independent or not? Perform an appropriate hypothesis test at the 90% confidence level.

SOLUTION: Perform a \(\chi^2\)-test of independence. First calculate row and column probabilities:

  1st 2nd 3rd Crew  
Survived 203 118 178 212 711 (0.323)
Perished 122 167 528 673 1490 (0.677)
  325 (0.148) 285 (0.129) 706 (0.321) 885 (0.402) 2201 (1)

Then find expected cell counts if the two were independent (row probability multiplied by column probability multiplied by the total number of passengers):

  1st 2nd 3rd Crew
Survived 203 (105.21) 118 (91.71) 178 (228.21) 212 (285.79)
Perished 122 (217.27) 167 (189.38) 528 (471.25) 673 (590.16)

Now find the \(\chi^2\) statistic:

\[\begin{align} \chi^2 &= \sum \frac{(O_i - E_i)^2}{E_i}\\ &= \frac{(203-105.21)^2}{105.21} + \frac{(118-91.71)^2}{91.71}\\ &+ \frac{(178-228.21)^2}{228.21} + \frac{(212-285.79)^2}{285.79}\\ &+ \frac{(122-217.27)^2}{217.27} + \frac{(167-189.38)^2}{189.38}\\ &+ \frac{(528-471.25)^2}{471.25} + \frac{(673-590.16)^2}{590.16}\\ &= 191.411 \end{align}\]

The number of degrees of freedom is 3 (number of rows minus 1, multiplied by number of columns minus 1). From \(\chi^2\) tables the critical value at 90% confidence is 6.251. As 191.411 > 6.251, we reject the null hypothesis and say that passenger class and survivability are not independent.


Question G

The contingency table below shows the results of a medical trial, where two treatment were used, A and B.

  Treatment A Treatment B
Cured 31 57
Not cured 11 51

Are treatment and recovery independent or not? Perform an appropriate hypothesis test at the 95% confidence level.

SOLUTION: Perform a \(\chi^2\)-test of independence. First calculate row and column probabilities:

  Treatment A Treatment B  
Cured 31 57 88 (0.587)
Not cured 11 51 62 (0.413)
  42 (0.28) 108 (0.72) 150 (1)

Then find expected cell counts if the two were independent (row probability multiplied by column probability multiplied by the total number of patients):

  Treatment A Treatment B
Cured 31 (24.654) 57 (63.396)
Not cured 11 (17.346) 51 (44.604)

31, 57, 11, 51 24.654, 63.396, 17.346, 44.604

Now find the \(\chi^2\) statistic:

\[\begin{align} \chi^2 &= \sum \frac{(O_i - E_i)^2}{E_i}\\ &= \frac{(31-24.654)^2}{24.654} + \frac{(57-63.396)^2}{63.396}\\ &+ \frac{(11-17.346)^2}{17.346} + \frac{(51-13.629)^2}{44.604}\\ &= 5.518 \end{align}\]

The number of degrees of freedom is 1 (number of rows minus 1, multiplied by number of columns minus 1). From \(\chi^2\) tables the critical value at 95% confidence is 3.841. As 5.518 > 3.841, we reject the null hypothesis and say that treatment and cure are not independent.


Question H

In a study, children are given a score between 0 and 20 that corresponds to reading ability. Ten children are assessed and given an initial score. They are then given an hour session with a reading development specialist, and are assessed once again. The scores are given below:

Child A B C D E F G H I J
Score 1 10 13 9 18 14 8 6 20 13 10
Score 2 11 16 5 17 20 9 6 15 18 14

The psychologists want to be 95% confident that the session with a reading development specialist has improved the children’s reading scores. Perform an appropriate hypothesis test.

SOLUTION: Perform a paired sample \(t\)-test. The differences are \(\{1, 3, -4, -1, 6, 1, 0, -5, 5, 4\}\). \(H_0\): \(\mu = 0\). \(H_1\): \(\mu > 0\). One tailed. We obtain a \(p\)-value of 0.204484 which is not than 0.05, and so we cannot reject the null hypothesis, and say we have no evidence to say that the specialist has improved their reading scores.