Back to homeMathematics · 1st Bach. Science · Change subject
Start for free
Notes

Exercises: Basic statistics

Practice★☆☆
An agricultural engineer is calibrating a soil moisture sensor. The last 5 readings, as percentages, are: $22, 24, 23, 25, 21$. Calculate the arithmetic mean and the…

An agricultural engineer is calibrating a soil moisture sensor. The last 5 readings, as percentages, are: $22, 24, 23, 25, 21$. Calculate the arithmetic mean and the population standard deviation of these measurements.

Solve
Practice★☆☆
In a sociological study on reading habits, 50 people were surveyed about their sex ($X$: $1$ for Male, $2$ for Female) and whether they read more than one book a month…

In a sociological study on reading habits, 50 people were surveyed about their sex ($X$: $1$ for Male, $2$ for Female) and whether they read more than one book a month ($Y$: $1$ for Yes, $2$ for No). The joint absolute frequency table $n_{ij}$ is as follows: $n_{11} = 10$, $n_{12} = 15$, $n_{21} = 20$, $n_{22} = 5$. Construct the marginal distribution table for the variable $Y$ and calculate its relative frequencies.

You can do it on paper and send a photo with your answer.

Solve
Practice★☆☆
Look at the following scatter diagram relating weekly training hours ($X$) and time in seconds in a 100-metre sprint ($Y$) for a group of athletes. State whether the…

Look at the following scatter diagram relating weekly training hours ($X$) and time in seconds in a 100-metre sprint ($Y$) for a group of athletes. State whether the correlation between both variables is positive or negative, and reason visually whether the linear dependence appears to be strong or weak.

X (hours) Y (sec) 2 4 6 8 10 12 14 16
Solve
Practice★☆☆
The human resources department of an engineering firm has collected data on the years of experience ($X$) and monthly salary in thousands of euros ($Y$) of its…

The human resources department of an engineering firm has collected data on the years of experience ($X$) and monthly salary in thousands of euros ($Y$) of its employees. Given that the mean experience is $\bar{x} = 5$ years, the mean salary is $\bar{y} = 2,5$ thousand euros, the sample size is $N = 20$ and the sum of cross-products is $\sum_{i=1}^{20} x_i y_i = 280$, calculate the covariance $\sigma_{xy}$.

Solve
Practice★☆☆
In a maternity ward, the weight in kg ($X$) and length in cm ($Y$) of 6 newborn babies were measured, obtaining the following pairs of values $(x_i, y_i)$: $(3,2; 50)$,…

In a maternity ward, the weight in kg ($X$) and length in cm ($Y$) of 6 newborn babies were measured, obtaining the following pairs of values $(x_i, y_i)$: $(3,2; 50)$, $(3,5; 52)$, $(3,2; 51)$, $(3,8; 52)$, $(3,5; 50)$ and $(3,2; 50)$. Construct the two-way table (joint absolute frequencies) for these two variables.

You can do it on paper and send a photo with your answer.

Solve
Practice★☆☆
From a joint frequency table of two variables $X$ (number of siblings) and $Y$ (number of pets), it is known that the marginal absolute frequency of $X=1$ is…

From a joint frequency table of two variables $X$ (number of siblings) and $Y$ (number of pets), it is known that the marginal absolute frequency of $X=1$ is $n_{1\bullet} = 40$. Of those 40 people, 15 have $Y=0$ pets, 20 have $Y=1$ pet and 5 have $Y=2$ pets. Calculate the relative frequency distribution of the variable $Y$ conditional on $X=1$.

Solve
Practice★☆☆
A marine biologist compares the length of two fish species. Species Alpha has a mean length of $40$ cm with a standard deviation of $4$ cm. Species Beta has a mean…

A marine biologist compares the length of two fish species. Species Alpha has a mean length of $40$ cm with a standard deviation of $4$ cm. Species Beta has a mean length of $150$ cm with a standard deviation of $12$ cm. Calculate the coefficient of variation for both species and state which one shows greater relative dispersion.

Solve
Practice★☆☆
The scores obtained by the 9 members of a rhythmic gymnastics team in a flexibility test are: $16, 17, 16, 18, 16, 17, 19, 16, 17$. Determine the mode, the median and…

The scores obtained by the 9 members of a rhythmic gymnastics team in a flexibility test are: $16, 17, 16, 18, 16, 17, 19, 16, 17$. Determine the mode, the median and the lower quartile ($Q_1$) of this dataset.

Solve
Practice★☆☆
In a study on performance in 1st year Bachillerato Mathematics, the relationship between the regular use of a graphing calculator ($X$: Yes, No) and the result in the…

In a study on performance in 1st year Bachillerato Mathematics, the relationship between the regular use of a graphing calculator ($X$: Yes, No) and the result in the final evaluation ($Y$: Pass, Fail) is analysed for a sample of $50$ students from a high school. The joint data are:

  • Students who use a calculator and pass: $18$

  • Students who use a calculator and fail: $2$

  • Students who do not use a calculator and pass: $15$

  • Students who do not use a calculator and fail: $15$

Carlos, a student in the class, states: "The percentage of students who pass because of using a calculator is $36\,\%$, since $18/50 = 0{,}36$".

  1. a) Identify and explain in detail Carlos's conceptual error in interpreting a joint relative frequency $f_{11}$ as if it were a conditional frequency.
  2. b) State and calculate the conditional relative frequency that rigorously answers the question: "Among the students who use a graphing calculator, what is the pass rate?". Compare this value with the overall pass rate in the sample and interpret the difference.
Solve
Practice★☆☆
At an AEMET weather station located in the mountains, the following maximum temperatures (in ºC) have been recorded over five consecutive winter days: $-2, 1, 3, 4, 9$.…

At an AEMET weather station located in the mountains, the following maximum temperatures (in ºC) have been recorded over five consecutive winter days: $-2, 1, 3, 4, 9$.

  1. a) Without carrying out formal operations yet, estimate with justification between which two integers the arithmetic mean $\bar{x}$ must lie and reason whether you expect the standard deviation to be less than or greater than $5$ ºC given the range of the data.
  2. b) Check your estimate by calculating the exact value of the arithmetic mean $\bar{x}$, the variance $\sigma^2$, and the standard deviation $\sigma$.
  3. c) Evaluate the quadratic error function $f(c) = \sum_{i=1}^5 (x_i - c)^2$ for the values $c = 2$, $c = \bar{x}$, and $c = 4$. Check numerically whether the theoretical property holds that this function strictly achieves its minimum value at the arithmetic mean.
Solve
Practice★★☆
A veterinary clinic classifies the dogs seen in a month according to their size ($X$: $1$ = Small, $2$ = Medium, $3$ = Large) and the number of visits to the vet in the…

A veterinary clinic classifies the dogs seen in a month according to their size ($X$: $1$ = Small, $2$ = Medium, $3$ = Large) and the number of visits to the vet in the last year ($Y$: $1, 2, 3$). The joint frequency table $n_{ij}$ is:

  • For $X=1$: $n_{11}=12$, $n_{12}=8$, $n_{13}=5$

  • For $X=2$: $n_{21}=10$, $n_{22}=15$, $n_{23}=10$

  • For $X=3$: $n_{31}=4$, $n_{32}=6$, $n_{33}=10$

Calculate the arithmetic mean and the variance of the marginal distribution of the number of visits ($Y$).

Solve
Practice★★☆
The following scatter diagram represents the price in thousands of euros ($Y$) against age in years ($X$) of a specific model of second-hand van. From the points shown…

The following scatter diagram represents the price in thousands of euros ($Y$) against age in years ($X$) of a specific model of second-hand van. From the points shown exactly on the grid intersections of the graph, construct the bivariate data table and calculate the marginal mean age $\bar{x}$ and the marginal mean price $\bar{y}$.

X Y 1 2 3 4 5 4 8 12 16

You can do it on paper and send a photo with your answer.

Solve
Practice★★☆
In an agronomy study, the amount of fertiliser applied in kg/ha ($X$) and the crop yield in tonnes/ha ($Y$) are analysed. The following two-way table for the joint…

In an agronomy study, the amount of fertiliser applied in kg/ha ($X$) and the crop yield in tonnes/ha ($Y$) are analysed. The following two-way table for the joint frequencies $n_{ij}$ is available:

$X$ \ $Y$ $2$ $4$ $6$
10 $1$ $2$ $0$
20 $0$ $3$ $1$
30 $0$ $1$ $2$

Calculate the mean and standard deviation of the crop yield conditional on $20$ kg/ha of fertiliser having been applied (that is, from the distribution $Y | X=20$).

Solve
Practice★★☆
Two aeronautical component factories produce parts whose lifespan is a statistical variable. Factory Alpha produces components with a mean lifespan of $1200$ hours and a…

Two aeronautical component factories produce parts whose lifespan is a statistical variable. Factory Alpha produces components with a mean lifespan of $1200$ hours and a variance of $14400$ hours$^2$. Factory Beta produces components with a mean lifespan of $800$ hours and a variance of $10000$ hours$^2$. By calculating a suitable measure of relative dispersion, justify which factory has a more homogeneous production.

Solve
Practice★★☆
Two qualitative variables are analysed in a sample of $200$ tourists: continent of origin ($X$: European, American, Asian) and type of accommodation ($Y$: Hotel,…

Two qualitative variables are analysed in a sample of $200$ tourists: continent of origin ($X$: European, American, Asian) and type of accommodation ($Y$: Hotel, Apartment). The marginal relative frequencies are: European $50\%$, American $30\%$, Asian $20\%$. For accommodation: Hotel $60\%$, Apartment $40\%$. Assuming that both variables are statistically independent, how many tourists in the sample are expected to be American and stay in an apartment at the same time?

Solve
Practice★★☆
At a weather station, the maximum daily wind speed ($X$, in km/h) has been grouped into the following intervals: $[0, 10)$, $[10, 20)$, $[20, 30)$, $[30, 40)$, with…

At a weather station, the maximum daily wind speed ($X$, in km/h) has been grouped into the following intervals: $[0, 10)$, $[10, 20)$, $[20, 30)$, $[30, 40)$, with absolute frequencies $5, 12, 8, 5$ respectively. Using the class midpoints of each interval, calculate the arithmetic mean and variance of the wind speed.

Solve
Practice★★☆
A cycling team recorded the distances covered in their last 4 training sessions: $45, 50, x, 60$ kilometres. Given that the mean distance of the 4 training sessions is…

A cycling team recorded the distances covered in their last 4 training sessions: $45, 50, x, 60$ kilometres. Given that the mean distance of the 4 training sessions is exactly $52,5$ km, first determine the missing training session value ($x$) and then calculate the population standard deviation of the 4 training sessions.

Solve
Practice★★☆
The following scatter diagram shows the relationship between the force applied to a spring in Newtons ($X$) and its length in centimetres ($Y$). Given that the exact…

The following scatter diagram shows the relationship between the force applied to a spring in Newtons ($X$) and its length in centimetres ($Y$). Given that the exact pairs of values are $(1, 3)$, $(2, 5)$, $(3, 7)$ and $(4, 9)$, calculate the covariance $\sigma_{xy}$ and check analytically whether there is an exact functional relationship between both variables.

X Y 1 2 3 4 3 5 7 9
Solve
Practice★★☆
Based on data inspired by the Survey on Equipment and Use of Information Technologies in Households by the INE, the relationship between the age of users ($X$, with…

Based on data inspired by the Survey on Equipment and Use of Information Technologies in Households by the INE, the relationship between the age of users ($X$, with three intervals represented by their class mark: $20$ years for young people aged 16 to 24, $40$ years for adults aged 25 to 54, and $65$ years for seniors over 55) and the average number of daily hours spent on digital screen leisure ($Y \in \{1, 3, 5\}$ hours) is analysed. The joint absolute frequency distribution in a representative sample of $N = 200$ residents is:

$X$ \ $Y$ $1$ h $3$ h $5$ h
$20$ years $10$ $30$ $40$
$40$ years $25$ $45$ $10$
$65$ years $30$ $10$ $0$
  1. a) Obtain the tables for the marginal distributions of $X$ and $Y$, and calculate the mean age of the sample and the overall average of daily screen hours.
  2. b) Model the conditional distribution of digital leisure time for the youth group ($Y \,|\, X = 20$ years) and calculate its conditional mean and conditional standard deviation.
  3. c) Check whether intensive screen use ($Y = 5$ hours) is statistically independent of belonging to the youth group ($X = 20$ years) by formally comparing the joint relative frequency with the product of the corresponding marginal relative frequencies.
Solve
Practice★★☆
An urban transport cooperative has a fleet of $50$ electric vans and monitors energy consumption in kWh per $100$ km. The vehicles operate in two independent shifts:…

An urban transport cooperative has a fleet of $50$ electric vans and monitors energy consumption in kWh per $100$ km. The vehicles operate in two independent shifts: Morning ($30$ vans) and Afternoon ($20$ vans). Due to a data dump failure, individual records have been lost, but the system preserves the following aggregate indicators:

  • The overall mean consumption of the entire fleet was $8{,}2$ kWh/100 km with an overall variance $\sigma^2 = 0{,}96$.

  • In the Morning shift, the mean consumption was $8{,}0$ kWh/100 km with a standard deviation of $0{,}8$ kWh/100 km.

  1. a) Set up the weighted mean equation and determine the mean consumption recorded in the Afternoon shift.
  2. b) Using the relationship between sample variance, sum of squares, and mean (property $\sum x_i^2 = N(\sigma^2 + \bar{x}^2)$), reconstruct the total sum of squares for each shift and deduce the variance and standard deviation of consumption in the Afternoon shift.
  3. c) Calculate the coefficient of variation ($CV$) for each shift and reason which of the two groups showed a relatively more homogeneous consumption pattern.
Solve
Practice★★★
In a study on the relationship between the number of weekly hours spent playing sports ($X$) and the level of work stress ($Y$), the following joint absolute frequency…

In a study on the relationship between the number of weekly hours spent playing sports ($X$) and the level of work stress ($Y$), the following joint absolute frequency table is obtained, where $k$ is an unknown value:

$X$ \ $Y$ $2$ $5$ $8$
0 $1$ $2$ $3$
3 $2$ $4$ $k$
6 $1$ $2$ $3$

Mathematically determine the value of $k$ so that the variables $X$ and $Y$ are strictly statistically independent.

Solve
Practice★★★
Let $X$ and $Y$ be two bivariate statistical variables with means $\bar{x}, \bar{y}$, standard deviations $\sigma_x, \sigma_y$ and covariance $\sigma_{xy}$. If a linear…

Let $X$ and $Y$ be two bivariate statistical variables with means $\bar{x}, \bar{y}$, standard deviations $\sigma_x, \sigma_y$ and covariance $\sigma_{xy}$. If a linear transformation of the form $U = 3X - 2$ and $V = -2Y + 5$ is applied to both variables, prove analytically what the value of the new covariance $\sigma_{uv}$ will be, expressed in terms of $\sigma_{xy}$.

Solve
Practice★★★
In a tech company, the monthly base salary ($X$, in euros) has a mean of $1500$ and a standard deviation of $200$. Commissions for completed projects ($Y$, in euros)…

In a tech company, the monthly base salary ($X$, in euros) has a mean of $1500$ and a standard deviation of $200$. Commissions for completed projects ($Y$, in euros) have a mean of $300$ and a standard deviation of $100$. Given that the covariance between base salary and commissions is $\sigma_{xy} = 15000$, calculate the mean and variance of the total monthly salary $Z = X + Y$.

(Note: Recall the property of the variance of the sum of two correlated variables: $\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X,Y)$).

Solve
Practice★★★
A bivariate table of two variables $X$ and $Y$ taking the values $X \in \{1, 2\}$ and $Y \in \{0, 1\}$ is given. The following overall statistical data are known: the…

A bivariate table of two variables $X$ and $Y$ taking the values $X \in \{1, 2\}$ and $Y \in \{0, 1\}$ is given. The following overall statistical data are known: the sample size is $N=100$, the marginal mean of $X$ is $\bar{x} = 1,4$, the marginal mean of $Y$ is $\bar{y} = 0,6$, and the covariance is $\sigma_{xy} = 0,06$. Using the definitions of these parameters, completely reconstruct the joint absolute frequency table $n_{ij}$.

Solve
Practice★★★
A quality control analyst observes manufacturing errors in 10 production batches. The mean number of errors is $6,5$ and the variance is $2,25$. Later, during an audit,…

A quality control analyst observes manufacturing errors in 10 production batches. The mean number of errors is $6,5$ and the variance is $2,25$. Later, during an audit, they notice that a typographical error recorded $2$ errors instead of $8$ for one of the batches. Calculate the corrected new mean and variance without needing to know the individual data for the other 9 batches.

Solve
Practice★★★
The following scatter diagram shows the relationship between years of experience ($X$) and annual income in thousands of euros ($Y$) for a group of professionals,…

The following scatter diagram shows the relationship between years of experience ($X$) and annual income in thousands of euros ($Y$) for a group of professionals, divided into two different departments (Department A in blue and Department B in green). Explain the concept of Simpson's paradox based on what you would observe if you calculated the overall correlation of all points combined, versus the local correlations for each department separately.

X Y 1 2 3 4 5 6 2 4 6 8 Dept A Dept B
Solve
Practice★★★
Two independent epidemiological studies on body mass index (BMI) were carried out in a region. The first study, with a sample of $40$ people, obtained a mean of $22$ and…

Two independent epidemiological studies on body mass index (BMI) were carried out in a region. The first study, with a sample of $40$ people, obtained a mean of $22$ and a variance of $4$. The second study, with a sample of $60$ people, obtained a mean of $25$ and a variance of $5$. If both studies are combined into a single pooled sample of $100$ people, calculate the mean and variance of this combined sample.

Solve
Practice★★★
Given a univariate dataset $x_1, x_2, \dots, x_n$, the squared error function $f(c) = \sum_{i=1}^n (x_i - c)^2$ is defined, measuring the sum of squared distances from…

Given a univariate dataset $x_1, x_2, \dots, x_n$, the squared error function $f(c) = \sum_{i=1}^n (x_i - c)^2$ is defined, measuring the sum of squared distances from each data point to a constant value $c$. Prove analytically (using derivatives or completing the square) that the value of $c$ that minimises this function is exactly the arithmetic mean $\bar{x}$.

Solve
Practice★★★
To test whether there is a relationship of dependence between two statistical variables $X$ and $Y$ tabulated in a two-way table, two members of an analytics team debate…

To test whether there is a relationship of dependence between two statistical variables $X$ and $Y$ tabulated in a two-way table, two members of an analytics team debate which method to use:

  • Method A: Check whether the conditional means of $Y$ for each value of $X$ match each other and the marginal mean of $Y$ (that is, verify whether $\bar{y}_{X=x_1} = \bar{y}_{X=x_2} = \dots = \bar{y}$).

  • Method B: Check whether the conditional relative frequency distributions of each row match the marginal distribution of $Y$ (that is, verify whether $n_{ij}/n_{i\bullet} = n_{\bullet j}/N$ for all $i, j$).

Consider the following joint frequency table that summarises a pilot test on two training methods ($X \in \{1, 2\}$) and the level achieved on a discrete scale ($Y \in \{1, 2, 3\}$):

$X$ \ $Y$ $1$ $2$ $3$
$1$ $10$ $0$ $10$
$2$ $0$ $20$ $0$
  1. a) Apply Method A by calculating the conditional mean of $Y$ for $X=1$, the conditional mean of $Y$ for $X=2$, and the marginal mean $\bar{y}$. What conclusion about the relationship between $X$ and $Y$ would this method erroneously lead to?
  2. b) Apply Method B to cell $(X=1, Y=1)$ and rigorously justify why Method B is the only valid method for diagnosing statistical independence in general.
  3. c) Formally prove that the condition of Method B ($n_{ij}/n_{i\bullet} = n_{\bullet j}/N$ for all $i, j$) is algebraically equivalent to the symmetric definition $f_{ij} = f_{i\bullet} \cdot f_{\bullet j}$. Explain why finding a single cell that violates the equality is enough to rule out independence without needing to check the entire table.
Solve
Practice★★★
A regional transport consortium plans to locate a central transfer station along a straight regional road, whose positions are measured in kilometres ($x$) relative to…

A regional transport consortium plans to locate a central transfer station along a straight regional road, whose positions are measured in kilometres ($x$) relative to an origin node. Four municipalities with different daily passenger demands are located at kilometre points $x_1 = 10$, $x_2 = 20$, $x_3 = 35$, and $x_4 = 40$, with demands of $f_1 = 40$, $f_2 = 60$, $f_3 = 120$, and $f_4 = 80$ daily passengers, respectively ($N = 300$).

Two criteria are proposed to determine the kilometre position $c$ where to build the station:

  • Quadratic criterion: Minimise the cost function $E(c) = \sum_{i=1}^4 f_i(x_i - c)^2$, which heavily penalises the furthest municipalities.

  • Linear criterion: Minimise the total absolute travel distance of the passengers $L(c) = \sum_{i=1}^4 f_i|x_i - c|$.

  1. a) Prove by differentiating with respect to $c$ that the optimal value $c^*$ that minimises $E(c)$ is exactly the weighted arithmetic mean of the positions. Calculate the exact value of said kilometre point $c^*$ and the variance of the distances relative to it.
  2. b) Determine the median of the passenger distribution from the cumulative frequencies and check whether it coincides with the obtained arithmetic mean.
  3. c) Evaluate and compare the linear cost $L(c)$ by placing the station at the arithmetic mean ($c = c^*$) versus placing it at the median ($c = M$). Interpret the result obtained by explaining why the mean minimises the weighted sum of squared deviations but not the sum of absolute distances.
Solve