Skip to content
Pixel
العربية

5-1Unit 5 · Data Collection and Cleaning

Methods of Data Collection

10 min readStart exercises
In this lesson
  1. The Big Idea
  2. Data Collection: The First Stage of Analysis
  3. Primary Data and Secondary Data
  4. Population and Sample
  5. Sampling Methods: Simple Random and Stratified
  6. Sampling Bias
  7. Try It Yourself
  8. Common Mistakes
  9. Key Points
  10. FAQ

The Big Idea

Every data analysis starts with data collection. If you gather data that does not fit your question, or pick people in an unfair way, even perfect calculations cannot save you. In this lesson you will learn the difference between primary data, which you collect yourself for your question, and secondary data, which already exists. Then you will see how to study a small sample instead of everyone, how to choose it so it fairly represents the whole, and why a biased sample gives an answer that looks confident but is wrong.

Data Collection: The First Stage of Analysis

Once the purpose is clear, data analysis moves through a simple sequence: collect → organise → analyse. Data collection is the first stage. Here you plan ahead: what data do you need, and how will you collect it? That plan has to match the purpose of the analysis.

Why so much attention on collection? Because if the data is unsuitable for the question or low in quality, the results may be misleading, however careful the organising and analysis are afterwards. Collection is not a formality; it strongly shapes the quality of the whole analysis.

Example: a school wants to know what students think about break times. If it asks one class only, or borrows old figures from a different school, the maths afterwards may be correct, but the answer will not describe the students of this school.

Primary Data and Secondary Data

Primary data

Primary data is data that the researcher or team collects directly for the current study or analysis. Common ways to collect it:

  • Surveys/questionnaires: written questions people answer.
  • Interviews: questions asked face to face or by phone.
  • Observation: watching and recording yourself, such as counting cars at the school gate each morning.
  • Experiments: changing one thing and measuring its effect.

Its strength is that you design the collection around your question: you choose the questions, the timing and the people. The price is that it can take time, effort and cost. Most importantly, its quality is not automatically high; it depends on how well the collection is designed and carried out. A questionnaire with vague questions, or rushed interviews, produces weak primary data.

Secondary data

Secondary data is data that already exists: it was collected for an earlier purpose and is now reused for a new one. It may have been collected by others, such as a government body, an association or another researcher, or by the researcher themselves at an earlier time for a different purpose.

Its strength is that it can save time and cost: the information is ready and does not need to be collected again. But it was not designed for your question, so you need to check:

  • How it was collected: who collected it, and how?
  • Its definitions: what exactly does each column mean?
  • Gaps: are some years or groups missing?
  • Biases: were certain groups left out?
  • Fit: does it actually answer your current question?
Primary data vs secondary data Two facing panels. Primary data: you collect it now for this study, through surveys, interviews, observation or experiments; collection is designed for the question, but it takes time, effort and cost, and its quality depends on design and execution. Secondary data: already exists and is reused, such as government statistics, industry reports, earlier studies or your own old data; it often saves time and cost, but you must check its method, definitions, gaps, biases and fit to your question. Bottom line: neither type is automatically better, and they can be combined. Primary data vs secondary data Primary data You collect it now, for this study Survey Interview Observation Experiment + Designed around your question − Takes time, effort and cost ! Quality depends on how it is done Secondary data Already exists and is reused Govt statistics Industry report Earlier study Your old data + Often saves time and cost − Check its method, definitions, gaps ! its biases, and fit to your question Neither type is automatically better: choose or combine by purpose and limits
The test is not only who collected the data, but whether it fits your question and was collected well.

Which one is better?

There is no permanent winner. Primary data can be a very good fit for a specific question, but its reliability is not guaranteed. Secondary data can provide ready information, but it may or may not suit your question. You can also combine both, depending on your purpose and constraints: for example, take the number of students in each grade from school records (secondary), then run a short questionnaire about study time (primary).

Population and Sample

The population is all the individuals or items you want the study's conclusions to apply to. If your question is about the students at your school, the population is every student at the school, not just your class.

A sample is a part of the population that you actually study, chosen to represent it as well as possible.

Two more terms:

  • Census / complete enumeration: studying every unit in the population.
  • Sample survey: studying a selected sample only.

Why not always study everyone? Because examining the whole population can be difficult, expensive or slow. So we study a sample and draw conclusions about the whole. This is sampling: selecting a sample from the population. The key point is that how reliable your conclusions are depends heavily on the sampling method. A sample has to be a miniature version of the population, or conclusions drawn from it will not hold.

Sampling Methods: Simple Random and Stratified

Random selection, when done properly, can reduce some kinds of selection bias and can support generalising the results. But generalising does not depend on randomness alone. It also depends on sample size, the sampling frame (the list you choose from), non-response (people chosen who never answer) and measurement errors.

| Method | Idea | When does it help? | |---|---|---| | Simple random sampling | Units are chosen at random from the population frame, so each unit has a known, equal chance | A basic, easy-to-understand method, as long as there is a suitable frame to choose from | | Stratified sampling | The population is split into groups (strata) that matter for the question, then a sample is chosen from each group following a set design | When you need important groups represented; it can improve precision if the strata and proportions are chosen well |

Simple random sampling

Imagine a list of every student in the school, and you draw 40 names by lottery. That is simple random sampling: every student on the list has the same chance. Notice the condition: you need a suitable frame, a complete list to choose from. If the list is incomplete, say it only has morning-shift students, randomness cannot fix that gap.

Stratified sampling

Now suppose study time differs a lot between Grades 10, 11 and 12. A simple lottery might, by chance, pick very few students from one grade. The fix: split the students into strata by grade, then choose at random within each stratum. That way every grade is guaranteed to be represented.

A common design is to choose from each stratum in proportion to its size in the population. Example: a school has 800 students, 320 in Grade 10, 280 in Grade 11 and 200 in Grade 12, and you want a sample of 40 (5% of the population). Take 5% of each grade: 16 from Grade 10, 14 from Grade 11 and 10 from Grade 12.

From population to sample: three ways to choose At the top is the population: every student in the school, split into Grade 10, 11 and 12 in different colours. Three arrows lead to three samples. Simple random: chosen by chance from the full list, each student has an equal chance, so the colours come out mixed. Stratified: pick from every group, so every grade is represented. Biased, drawn with a dashed red outline: only whoever is easy to reach, so all its dots are one colour and whole groups are missing. Population: every student in the school Grade 10 Grade 11 Grade 12 Sampling: study a part to learn about the whole Simple random By chance from the full list Each student: equal chance Stratified Pick from every group Every grade is represented Biased Only whoever is easy to reach Whole groups are missing
Randomness and strata are two ways of representing the whole; picking whoever is easiest to reach is a shortcut to a biased sample.

Sampling Bias

Sampling bias is a distortion that happens when the way the sample is chosen makes some members of the population more or less likely to be included. The result is a sample that does not represent the population properly, so generalising from it becomes unreliable.

What makes bias dangerous is that it does not show up in the calculations. You can compute the average perfectly, write it confidently in your report, and it still does not describe the population, because the problem is in who got into the sample, not in the arithmetic.

Examples of different sources of distortion in a survey

| Type | What happens? | Example | |---|---|---| | Self-selection bias | Only people who want to answer do so | A web poll answered only by people who care a lot about the topic | | Response bias | Respondents pick the answer that sounds desirable instead of the accurate one | A student reports more study time than they actually did | | Time/location bias | The survey's time or place limits it to certain groups, which affects selection or coverage | A survey outside a station on weekday afternoons misses office workers and students |

Sources of distortion in a survey Two groups. The first group is distortion in who gets into the sample, meaning selection or coverage, with two cards: self-selection bias, where only people who want to reply do so, as in an open web poll answered only by the very interested; and time/location bias, where the time or place limits who is met, as in a survey at a station on weekday afternoons that misses workers and students. Its fix is a better sampling frame, selection and timing; this is sampling bias. The second group is distortion in how people answer: response bias, choosing an answer that sounds good rather than the true one, such as reporting more study time than really happened, fixed through question wording and answer format. A note at the bottom says response bias is a measurement problem, different from sampling bias. Where does the distortion in a survey come from? In WHO gets into the sample: selection / coverage Self-selection bias Only people who want to reply e.g. an open web poll: only the very interested reply Time/location bias Time or place limits who's met e.g. at a station on weekday afternoons: misses workers Fix: better sampling frame, selection, timing This is sampling bias In HOW people answer Response bias A 'nice' answer, not the truth e.g. reporting more study time than really happened Fix: question wording and answer format Response bias is a measurement problem, different from sampling bias: keep them apart
Always ask: is the problem in WHO answered, or in HOW they answered?

How do we reduce each kind?

The Arabic edition draws a clear line between two problems:

  1. Sampling bias (who got into the sample): reduce it by improving the sampling frame, the way participants are selected and the timing of reaching them. For example, draw by lottery from a list of all students, and run the survey at several different times instead of one.
  2. Response bias and measurement error (how people answered): reduce these through question wording and the answer format, for example an anonymous questionnaire and questions that do not hint at an "ideal" answer. These are different problems from sampling bias.

So if you word every question perfectly but hand the questionnaire only to students standing outside the library, your sample is still biased.

Try It Yourself

Try
Primary or secondary?
You are preparing a school project. Sort each data source: is it primary data you collect now for your question, or secondary data that already exists and you reuse?
Items (8)
Tap an item to select it, then tap the category it belongs to.
Nothing here yet
Nothing here yet
Try
How long is the trip to school?
The situation
Your school (800 students in three grades) wants the average time students take to get to school each day, and you cannot ask everyone. You know that most students in some grades come from distant villages. Which plan is best?
What would you do? You can try more than one choice.
Try
What kind of problem is it?
Tap a card to flip it and see the other side.

Common Mistakes

"Primary data is always reliable because I collected it myself"

Collecting data yourself makes it suitable for your question, not automatically reliable. A questionnaire with leading questions or a poor sample gives weak primary data.

The reliability of primary data depends on how well the collection is designed and carried out.

"Secondary data is only data collected by other people"

Secondary data is defined as data that already exists and was collected for an earlier purpose, then reused. Whoever collected it might be someone else, or you yourself at an earlier time.

The test: was the data collected for my current question (primary), or for an earlier purpose and then reused (secondary)?

"A big sample means a correct result"

A thousand answers from students standing outside the library is still a biased sample if whole groups are missing. Size does not fix a bad selection method.

What matters first is how the sample is chosen and whether it represents the population; then size and the other design factors.

"Careful question wording prevents sampling bias"

Question wording deals with response bias and measurement error, which is about how people answer. Sampling bias is about who got into the sample.

Sampling bias is reduced by improving the frame, selection and timing; response bias is reduced through wording and answer format.

"Stratified sampling means picking whoever I think fits from each group"

Choosing "by feel" inside each group lets bias back in through the side door.

In stratified sampling you split the population into groups that matter for the question, then choose at random from each group following a set design.

Key Points

  • Data collection is the first stage (collect → organise → analyse) and is planned around the purpose; unsuitable or poor data can give misleading results however careful the analysis.
  • Primary data is collected directly for the current study (surveys, interviews, observation, experiments); it fits the question but costs time and effort, and its quality depends on design and execution.
  • Secondary data already exists and is reused; it saves time, but check how it was collected, its definitions, gaps, biases and fit.
  • The population is everyone you want to generalise to; the sample is the part you study. Studying everyone is a census; studying part is a sample survey.
  • Simple random sampling chooses by chance from the population frame with equal chances, and needs a suitable frame.
  • Stratified sampling splits the population into groups that matter for the question, then chooses from each group following a set design.
  • Sampling bias makes some groups more or less likely to be included, so the result looks confident but cannot be generalised; examples are self-selection and time/location bias.
  • Response bias is a problem in how people answer, fixed through question wording, and it is different from sampling bias.

FAQ

What is the difference between primary and secondary data, in short?

Primary data is collected by you now for your current question, like a questionnaire you designed. Secondary data already exists, was collected for an earlier purpose, and you reuse it, like published government statistics. What decides it is the data's relationship to your current question.

When should I use stratified sampling instead of simple random sampling?

When the population has groups whose answers may really differ on your topic, such as school grades or age groups, and you want to be sure every group is represented. If there are no such important groups and you have a complete frame, simple random sampling is a sound basic method.

Is response bias a type of sampling bias?

According to the Arabic edition of the book, no. Sampling bias is about who got into the sample; response bias is about how participants answer, and it is handled through question wording and answer format. The book asks you not to lump the different types under one name.

Why isn't it enough for my calculations to be correct?

Because calculations only work on the data in front of them. If the sample does not represent the population, the average you compute is correct for the sample but does not describe the population, so you reach a confident but wrong conclusion.

Done reading? Test yourself