Introduction to Statistics
A national TV show asks on its social media account who will win an election and receives $50\,000$ responses: that looks like a solid result. On voting day, the actual result is exactly the opposite. The problem is not the size of the sample, but who responded. Statistics begins precisely by controlling that.
Population, sample, and individual
Imagine you want to know what music the students at your high school listen to. Asking every single one would be slow and expensive. That is why we almost always study just a part.
Why not study the whole population?
-
Cost and time: surveying the more than 120 million inhabitants of the country is very expensive.
-
Destructive testing: to find out how long a light bulb lasts, you have to leave it on until it burns out; if you tested them all, none would be left to sell.
-
Inaccessible or infinite population: you can't measure every fish in a lake.
When the population is small (the $25$ students in your class) or an error would be serious (checking the brakes of every car), a census is the better choice.
Reliable data sources and relevant variables
Data can be primary (you collect it yourself with surveys, measurements, or experiments) or secondary (already compiled by another institution, such as the INEGI, the IMSS, or Banxico). Before collecting data, decide which variables are relevant to your question: if you are studying reading habits, the hours spent reading and the type of book matter, not the color of the backpack.
A courier company delivers $5\,000$ packages a day. To assess the average delivery time, the supervisor randomly selects $100$ packages and records the minutes they take…
A courier company delivers $5\,000$ packages a day. To assess the average delivery time, the supervisor randomly selects $100$ packages and records the minutes they take to reach their destination. Determine the size of the population and the sample size.
To find out the musical preferences of the students at a secondary school of $850$ students, the music teacher asked the $30$ students in his 4th ESO class. Identify the…
To find out the musical preferences of the students at a secondary school of $850$ students, the music teacher asked the $30$ students in his 4th ESO class. Identify the population, the sample, the sample size and the individuals of this statistical study.
State in which of the following cases it is better to study the entire population and in which it is necessary to select a sample. Give brief reasons for your answer.…
State in which of the following cases it is better to study the entire population and in which it is necessary to select a sample. Give brief reasons for your answer.
-
Checking the state of the brakes on all cars manufactured by a brand before selling them.
-
Studying the average lifespan of light bulbs produced by a factory (taking into account that to test them they must be left on until they blow).
-
Knowing the age of the $25$ students in a class.
-
Knowing the cholesterol level of the inhabitants of a country.
Types of statistical variables
A statistical variable is the characteristic observed in each individual. They are classified as follows:
-
Discrete: takes separate values that are counted (goals per game, passengers on a plane).
-
Continuous: can take any value in an interval, because it is measured (marathon time, liters of water, temperature).
Which graph should you use?
| Type of variable | Appropriate graph |
|---|---|
| Categorical | Bar graph (or pie chart) |
| Discrete quantitative, few data points | Dot plot |
| Continuous quantitative or with many values | Histogram |
Classify the following statistical variables into qualitative, discrete quantitative or continuous quantitative: The eye color of an optician's patients. The number of…
Classify the following statistical variables into qualitative, discrete quantitative or continuous quantitative:
-
The eye color of an optician's patients.
-
The number of books read in a year by the members of a library.
-
The maximum daily temperature recorded in a city during the month of August.
-
The brand of cell phone used by the teachers at a school.
In a shopping center parking lot there are $450$ vehicles. An employee notes the type of vehicle (car, motorcycle, van, 4x4) of $50$ of them chosen at random. Identify…
In a shopping center parking lot there are $450$ vehicles. An employee notes the type of vehicle (car, motorcycle, van, 4x4) of $50$ of them chosen at random. Identify the statistical variable being studied and state its type.
Classify the following quantitative variables as discrete or continuous: The number of goals scored by a soccer team in each league game. The time taken by runners to…
Classify the following quantitative variables as discrete or continuous:
-
The number of goals scored by a soccer team in each league game.
-
The time taken by runners to complete a marathon.
-
The amount of water, in liters, consumed by a family per month.
-
The number of passengers traveling on an airplane.
In a hospital, the following data are collected from patients admitted to A&E: blood group, heart rate in beats per minute, body temperature in degrees Celsius and the…
In a hospital, the following data are collected from patients admitted to A&E: blood group, heart rate in beats per minute, body temperature in degrees Celsius and the number of times they have visited A&E in the past year. Classify each of these four statistical variables and justify why body temperature and heart rate belong to different categories.
Imagine a statistical study is carried out on the laptops owned by students in your city. Give an example of a qualitative variable, a discrete quantitative variable,…
Imagine a statistical study is carried out on the laptops owned by students in your city. Give an example of a qualitative variable, a discrete quantitative variable, and a continuous quantitative variable that could be investigated in this study.
When filling out a form, citizens are asked to enter their national identity number (DNI) and the postcode of their municipality. Although both pieces of data consist of…
When filling out a form, citizens are asked to enter their national identity number (DNI) and the postcode of their municipality. Although both pieces of data consist of numerical digits, from a statistical point of view they are not considered quantitative variables. Explain what type of variables they are and why it makes no sense to calculate the arithmetic mean of postcodes.
Random and stratified sampling
For a sample to be good, every individual must have the same chance of being selected. In simple random sampling, you draw names with a raffle drum, with random numbers from a spreadsheet, or with a simulation.
Sometimes the population is divided into groups (strata: shifts, classes, departments) that behave differently. In stratified sampling, the population is separated into strata and individuals are chosen at random within each one, so that no group is left out of the sample.
The idea is that each stratum should carry the same weight in the sample as it does in the population. If one shift makes up $60\,\%$ of the students, it should make up about $60\,\%$ of the sample. Here it is enough to recognize the method and reason with percents; no special formula is needed.
In a city of $120\,000$ inhabitants, a telephone survey is conducted with $600$ people. What percentage of the total population was surveyed? It is known that $15\,\%$…
In a city of $120\,000$ inhabitants, a telephone survey is conducted with $600$ people.
-
What percentage of the total population was surveyed?
-
It is known that $15\,\%$ of the city's inhabitants are young people aged between $18$ and $25$ years old. For the sample of $600$ people to be representative regarding age, how many young people in that age group should be included in the sample?
A technology company employs $300$ programmers and $200$ graphic designers. The human resources department wants to carry out a survey on the working environment by…
A technology company employs $300$ programmers and $200$ graphic designers. The human resources department wants to carry out a survey on the working environment by selecting a sample of $50$ employees using proportional stratified random sampling. How many programmers and how many designers should be in the sample?
A municipality is divided into three districts: the North district has $4\,500$ inhabitants, the South district has $2\,700$ inhabitants and the East district has…
A municipality is divided into three districts: the North district has $4\,500$ inhabitants, the South district has $2\,700$ inhabitants and the East district has $1\,800$ inhabitants. The municipality needs to select a sample of $200$ people using stratified sampling with proportional allocation. Calculate step by step how many respondents must be selected from each of the three districts so that the sample is representative.
In a secondary school of $800$ students, $60\,\%$ are girls. In addition, it is known that $25\,\%$ of the school's total students are in 4th ESO. We wish to select a…
In a secondary school of $800$ students, $60\,\%$ are girls. In addition, it is known that $25\,\%$ of the school's total students are in 4th ESO. We wish to select a representative sample of $40$ students using stratified sampling that takes into account both sex and year group simultaneously. Assuming that the proportion of girls in 4th ESO is the same as in the rest of the school, calculate how many girls in 4th ESO should be included in the sample.
Systematic sampling
Another way to choose without bias: the individuals are numbered from $1$ to $N$ and one out of every $k$ is selected, starting at a random position.
The principal of a secondary school has an alphabetical list of the $600$ enrolled students. He wants to select a sample of $30$ students using systematic random…
The principal of a secondary school has an alphabetical list of the $600$ enrolled students. He wants to select a sample of $30$ students using systematic random sampling.
-
Calculate the sampling interval (the step size between one individual and the next).
-
If the first student chosen at random is the one in position number $12$ on the list, state which positions the next three students selected for the sample will occupy.
Your local municipality wants to study the reading habits of citizens. Design a statistical study plan indicating: What the population would be. A suitable method for…
Your local municipality wants to study the reading habits of citizens. Design a statistical study plan indicating:
-
What the population would be.
-
A suitable method for choosing a representative sample of $200$ people, avoiding surveying only people leaving the municipal library.
-
Two qualitative statistical variables and two quantitative variables you would include in the questionnaire.
In a cinema auditorium there are $1\,200$ seats numbered from $1$ to $1\,200$. The manager wants to survey $40$ spectators. Explain how you would select the sample using…
In a cinema auditorium there are $1\,200$ seats numbered from $1$ to $1\,200$. The manager wants to survey $40$ spectators.
-
Explain how you would select the sample using systematic sampling. If the first seat chosen is seat $17$, which will be the last seat in the sample?
-
If the seats are divided into Stalls ($800$ seats) and Circle ($400$ seats), explain how you would make the selection using proportional stratified sampling.
Biased samples
A study is to be carried out on customer satisfaction at a pizzeria. To do this, the manager decides to survey only people who order pizza with pineapple. Do you think…
A study is to be carried out on customer satisfaction at a pizzeria. To do this, the manager decides to survey only people who order pizza with pineapple. Do you think the chosen sample is representative of all customers? Justify your answer.
A national television show launches a survey via its Twitter account asking: "Do you think the use of social networks should be banned for under-16s?". A total of…
A national television show launches a survey via its Twitter account asking: "Do you think the use of social networks should be banned for under-16s?". A total of $15\,000$ people respond. Identify the target population of the show and explain in detail why the results of this sample may be biased and not representative.
During a military conflict, military engineers analysed the bomber planes that returned to base with hits from enemy fire. They observed that most of the impacts were on…
During a military conflict, military engineers analysed the bomber planes that returned to base with hits from enemy fire. They observed that most of the impacts were on the wings and fuselage, so they proposed reinforcing the armour in those areas. A statistician opposed this decision, arguing a serious bias in the sample. Identify what the total population of planes was, what the analysed sample was, and explain statistically why the engineers' conclusion was flawed (what is known as "survivorship bias").
Two polling companies want to predict the outcome of a national election. Company A places a survey on the homepage of a well-known online sports newspaper and gets…
Two polling companies want to predict the outcome of a national election. Company A places a survey on the homepage of a well-known online sports newspaper and gets $50\,000$ voluntary responses. Company B makes phone calls to $1\,500$ people selected using stratified random sampling based on age, sex and electoral roll province. Argue in detail, based on the concepts of population, sample, size and representativeness, which of the two surveys will provide a more reliable prediction despite the huge difference in sample size.
Observational studies, experiments, and how to question data
In an observational study, you only observe and record what happens, without intervening (surveys, censuses). In an experiment, the researcher randomly assigns a treatment to some individuals and not to others (the control group), and then compares.
-
Observational: easier and cheaper, but only shows associations.
-
Experiment: random assignment lets you suspect a cause, but it is not always possible or ethical.
To question a claim or a graph, ask:
-
Who makes up the sample and how were they chosen?
-
Are there outliers that distort the result?
-
Is the graph misleading? (an axis that doesn't start at zero, uneven scales).
-
Is information about the whole population missing?
A newspaper publishes the following headline: "$80\,\%$ of traffic accidents occur within $20\text{ km}$ of the driver's home. Therefore, driving near home is much more…
A newspaper publishes the following headline: "$80\,\%$ of traffic accidents occur within $20\text{ km}$ of the driver's home. Therefore, driving near home is much more dangerous than making long journeys". Critically analyse this statement from a statistical perspective. Identify the flaw in the interpretation of the data and explain what additional information about the driver population would be needed to draw a valid conclusion.
In a health study, the weight (in $\text{kg}$) and height (in $\text{m}$) of individuals are measured. From these data, the Body Mass Index (BMI) is calculated using the…
In a health study, the weight (in $\text{kg}$) and height (in $\text{m}$) of individuals are measured. From these data, the Body Mass Index (BMI) is calculated using the formula $\text{BMI} = \frac{\text{Weight}}{\text{Height}^2}$. Subsequently, patients are classified into three categories: "Underweight" (BMI $< 18.5$), "Normal weight" (BMI between $18.5$ and $24.9$) and "Overweight" (BMI $\geq 25$). Identify and classify the type of statistical variable in each phase of the study: weight, height, the numerical value of BMI, and the final category assigned to the patient.
The municipality of a large city is evaluating the construction of a new bike lane that would eliminate parking spaces for cars. Propose three sample design or data…
The municipality of a large city is evaluating the construction of a new bike lane that would eliminate parking spaces for cars. Propose three sample design or data collection methods that would yield intentionally biased results: one that favors "Yes" to the bike lane, another that favors "No", and explain why the bias occurs in each case. Finally, propose a rigorous method to obtain a truly representative sample of the city's opinion.
The money a person carries in their purse or wallet is measured in pesos and cents (for example, $250\text{ \$}…
The money a person carries in their purse or wallet is measured in pesos and cents (for example, $250\text{ \$}$). Discuss whether this statistical variable should be considered discrete quantitative or continuous quantitative. Provide arguments in favor of both classifications and conclude which is the most mathematically rigorous.
Back to the beginning: the TV show's survey failed because of self-selection and incomplete coverage: the followers of that account responded voluntarily, and they do not represent the whole country no matter how many responses ($50\,000$) add up.