- Learn
- Social Sciences
- Sociology & Anthropology
- Social Research Methods
- Analyzing Quantitative Data
Analyzing Quantitative Data
BeginnerLesson 6 of 10 in Social Research Methods Course
What you will learn
- Turn completed questionnaires into a clean, documented data file: write a codebook, enter and check the data, and create the new variables your analysis needs.
- Write a codebook and code survey answersGive every answer a numeric code, record the codes and missing-value rules in a codebook, and code multiple-response and open questions.
- Enter, check and clean the dataSet up a case-by-variable data file, find and correct entry errors, and handle missing values so that they do not distort results.
- Recode and compute new variablesCollapse categories, reverse-code items, build scales and dummy variables from existing variables, and check that every recode worked.
- Write a codebook and code survey answers
- Classify each variable by its level of measurement and use that, together with the research question, to choose suitable statistics and charts.
- Identify the level of measurement of each variableTell nominal, ordinal, interval and ratio variables apart, recognize dichotomous variables, and see how the way a question is asked fixes its level.
- Choose the right analysis for one or two variablesPick the univariate summaries and the bivariate method that fit the variables' levels, and decide which variable is independent and which is dependent.
- Identify the level of measurement of each variable
- Summarize each variable on its own with frequency tables, suitable charts and measures of center and spread, and read these summaries correctly.
- Build and read frequency tablesProduce frequency tables with counts, percentages, valid percentages and cumulative percentages, and group numeric data into classes.
- Show a distribution with a suitable chartChoose between bar charts, pie charts, histograms and box plots according to the level of measurement, describe the shape of a distribution, and avoid misleading charts.
- Summarize center and spread for each levelChoose the measures of center and spread that fit the level of measurement and the shape of the distribution, and report them correctly.
- Build and read frequency tables
- Examine how two variables are related with crosstabs, correlations and group means, and judge what a relationship in survey data can and cannot show.
- Build and read a crosstabulationLay out a crosstab, percentage it in the right direction, compare groups in percentage points, and present it clearly.
- Measure correlation with Pearson's r and Spearman's rhoUse scatterplots and correlation coefficients to describe the direction and strength of relationships between ordinal or numeric variables, and recognize the limits of a correlation.
- Compare group means and calculate etaDescribe how a numeric variable differs between the categories of a nominal or ordinal variable, using group means and the strength measure eta.
- Judge whether a relationship could be causalSeparate association from causation, use a third variable to test whether a relationship is spurious, and describe relationships in careful language.
- Build and read a crosstabulation
- Test whether sample relationships are likely to hold in the population, measure how strong they are, and write up both clearly in a research report.
- Test a crosstab with chi-squareCalculate expected counts, read the chi-square statistic with its degrees of freedom and p-value, and check that the test's conditions are met.
- Interpret p-values and statistical significanceRead p-values correctly for crosstabs, correlations and mean comparisons, and know what statistical significance does and does not tell you.
- Measure and judge effect sizesUse percentage-point differences, phi, Cramér's V, r, r² and eta² to say how strong a relationship is, and weigh effect size against statistical significance.
- Write up quantitative results in a research reportPresent descriptive and bivariate results in clear tables and text, format statistics in a standard style, and state the limits of the findings.
- Test a crosstab with chi-square
- Set up, analyze and document a survey data set in SPSS, R or JASP, and read the output these programs produce.
- Set up and prepare a data file in SPSS, R or JASPImport data, define variables, value labels, missing values and measurement levels, and recode variables in a way that can be repeated.
- Run analyses and read the outputFind the procedures for frequencies, crosstabs, correlations and group means in each program, and pick out the numbers that belong in a report.
- Set up and prepare a data file in SPSS, R or JASP
Analyzing Quantitative Data study guide
1Prepare a survey data set for analysis
Survey analysis begins before the first table. Answers need a file structure, clear code meanings and checks that catch errors without changing what respondents said. You will build a codebook, protect the raw file, distinguish kinds of missing answers and create useful new variables. Each preparation decision leaves a record so another researcher can follow how the analysis file was made.
1.1 Write a codebook and code survey answers
A survey answer becomes usable data when its meaning survives the move into a file. Coding gives answers numbers or short labels; a codebook records what those codes mean.
Set up cases, variables and values
A case is the unit you study, usually one respondent. A variable is a characteristic, such as age or trust. A value is one case's answer on that variable. Give each case a respondent ID so you can trace a questionable value back to its questionnaire. Keep names, email addresses and phone numbers out of the analysis file to protect confidentiality.
Choose a short, unique variable name, starting with a letter and using letters, digits and underscores. For example, q7_trust works across SPSS, R and JASP. Put the full question in the variable label. The name identifies the column; the label explains it.
Write a codebook entry
For “How much do you trust the national parliament?”, record:
| Code | Meaning |
|---|---|
| 1 | Not at all |
| 2 | Not very much |
| 3 | Quite a lot |
| 4 | A great deal |
| 8 | Don't know |
| 9 | No answer |
Declare 8 and 9 missing, and record the measurement level as ordinal. Include routing notes if only some respondents should answer. A complete entry brings together the variable name, question label, value labels, missing-value rules and level. Someone using the file should be able to interpret it without asking its creator.
Numeric codes can be labels. If religious affiliation is coded 1, 2 and 3, averaging those codes gives a number with no useful meaning. Renumbering the categories would change that average while leaving every response unchanged.
Code different question formats
A multiple-response question such as “Which platforms do you use? Select all that apply” needs one variable per option. Code each as 1 for selected and 0 for not selected. One respondent can have several 1s. If the export stores “Facebook; TikTok” in one cell, split the selections into separate variables before counting them. Keep an unanswered question distinct from an explicit selection of no options when the questionnaire makes that distinction.
For an open question, read a sample of answers and develop a coding frame: the categories and rules for assigning them. For a single-category variable, categories must be mutually exclusive and cover all valid answers, including an “Other” category. Have a second coder classify part of the answers, then compare decisions to check reliability.
Preserve the reasons for missing answers
“Don't know,” “Refused” and “Not applicable” have different meanings. Separate codes let you report them separately even when all are excluded from a calculation. Choose codes outside the possible valid range. Age 99 can be real, so −9 is safer as an age missing code. A codebook records the intended meaning; the software must also be told to treat that code as missing.
Key Takeaways
- A codebook preserves meanings, missing rules and measurement levels.
- Use respondent IDs to trace values without direct identifiers in the analysis file.
- Code multiple selections in separate 0/1 variables.
- Build and check a coding frame for open answers.
- Keep different reasons for missingness distinguishable.
1.2 Enter, check and clean the data
The analysis file is a data matrix: rows are cases, columns are variables and cells hold values. Cleaning checks that those values match both the codebook and the answers people actually gave.
Enter and inspect the file
The first row of a CSV contains variable names. A later row such as 1043, 2, 34, 3 can represent respondent ID, gender code, age and trust code. Online platforms often export CSV or SPSS files directly. Paper questionnaires need manual entry; double entry compares two independent entries of all or part of the data to find typing errors.
Keep the raw file unchanged. Work on a copy and record corrections in a cleaning log, syntax file or script. Record the case ID, variable, old value, new value and reason when correcting individual entries. This makes a change traceable and lets you undo it.
Check ranges and consistency
Run a frequency table for every variable. Compare all observed codes with the codebook, including the missing codes. For trust coded 1–4, 8 and 9, a value of 6 fails a range check. Find the questionnaire using the ID. Correct the entry if the original answer is available; otherwise set the value to missing. Guessing the intended answer would create data.
A valid range does not guarantee a valid response. A consistency check compares related answers or routing. Someone recorded as having no paid job but working 40 paid hours a week needs checking. A crosstab of employment and work hours can reveal this conflict. Resolve it against the original answers and the routing rules.
For online responses, also flag duplicate IDs or identical submissions, implausibly fast completion (speeding) and repeated identical choices across a grid (straightlining). A flag calls for a documented decision. State the exclusion rule and the number of cases it removes so readers can assess its consequences.
Make missing values truly missing
An undeclared missing code enters numeric calculations. For ages 25, 40 and 31, with 99 used for an unanswered age, the software can calculate:
After declaring 99 missing, the valid mean is:
Check frequencies again after declaring missing values. You should still be able to count missing cases, but they should no longer contribute as valid ages or answers.
Follow the number of valid cases
With listwise deletion, a case missing on any variable used in an analysis is excluded from that whole analysis. Pairwise deletion keeps every case valid for each pair, so coefficients in a correlation matrix can have different sample sizes. The choice changes who contributes to a result. Report the valid n for each analysis, and investigate unexpected changes in it before interpreting changes in the statistics.
Key Takeaways
- Keep the raw file unchanged and document every cleaning decision.
- Range checks compare individual values with the codebook.
- Consistency checks compare related answers and routing.
- Declare missing codes before calculating statistics.
- Listwise and pairwise deletion can produce different analysis bases.
1.3 Recode and compute new variables
New research questions often need new variables. Recoding changes values by a stated rule; computing creates values through a calculation. Save new variables separately so the original information remains available.
Group values without losing track of them
Age in years can become age groups: 18–34, 35–54 and 55 and over. The boundaries must cover every valid age without overlap. Age 34 goes in the first group and 35 in the second. The original age is ratio data; the groups are ordinal. Keeping age in years lets you return to the finer detail later.
Combining sparse categories can make percentages more stable and crosstabs less empty. Combine categories that belong together in meaning. A small category alone is not a reason to merge it with an unrelated one. Record the rule and new value labels in the codebook.
Reverse items before building a scale
A scale can contain positive and negative statements about the same concept. If high scores mean social connection, agreement with “I often feel left out” must point downward. Reverse a 1–5 item with:
Thus 5 becomes 1, 4 becomes 2, 3 stays 3, 2 becomes 4 and 1 becomes 5. The general rule is minimum plus maximum minus the old value. Missing values must stay missing; they are not part of the response scale.
A summated scale adds several items measuring the same concept after aligning their direction. Four items scored 1–5 produce a total from 4 to 20. Their mean stays within 1–5. Check whether the items hang together before combining them: Cronbach's alpha of about .70 or above is a common rule of thumb. A high alpha by itself does not establish that the scale measures the intended concept. State how missing items are handled when defining the score.
Create an indicator for one category
A dummy variable marks membership with 1 and nonmembership with 0. For example, “Has a university degree” can be 1 for yes and 0 for otherwise. The mean is the share coded 1:
So 60% of these five respondents have a degree. This interpretation depends on 0/1 coding; arbitrary category numbers do not have it.
Check the result against the original
Crosstab the old and new variables. Each valid original value should land in its intended new category. An age missing code of 99 must not become “55 and over.” Check the minimum, maximum and missing count of computed scores as well.
Some calculations are approximations. Survey year minus birth year overestimates age by one for people whose birthday has not yet occurred. Note that approximation in the codebook so a later analyst does not treat it as exact age.
Key Takeaways
- Preserve original variables when recoding or computing.
- Grouping boundaries must cover valid values without overlap.
- Reverse negative items before combining scale scores.
- A 0/1 variable’s mean is the proportion coded 1.
- Check old against new values and preserve missingness.
- Document approximations and scale-scoring rules.
2Match analyses to levels of measurement
A useful analysis respects what each variable actually measures. A category number, an ordered rating and a count can look similar in a spreadsheet while supporting different comparisons. You will identify those differences, choose summaries for one variable and match methods to pairs of variables. The research question and the shape of the data guide the choice alongside measurement level.
2.1 Identify the level of measurement of each variable
A variable's level of measurement tells you what comparisons its values support. Start with how the question collected the answers, then choose the level. Numbers in a column are not enough to decide.
Distinguish the four levels
| Level | What the values express | Example |
|---|---|---|
| Nominal | Different categories, without an order | Main way of traveling to work |
| Ordinal | Ordered categories, without known equal gaps | Highest education level |
| Interval | Equal gaps, without a true zero | Temperature in degrees Celsius |
| Ratio | Equal gaps and a true zero | Weekly working hours |
Each level adds a property to the levels below it. Nominal data allow same-or-different comparisons. Ordinal data also allow higher-or-lower comparisons. Interval data support meaningful differences. Ratio data also support ratios: 40 working hours is twice 20 hours. A temperature of 20 °C is not twice as warm as 10 °C because Celsius zero is not an absence of temperature.
SPSS and JASP call interval and ratio variables scale. This software label groups two measurement levels; it does not mean the column is necessarily a questionnaire scale made from several items.
Use the actual answers, not the concept name
Age collected in years is ratio; age collected in bands is ordinal. “Do you have children?” gives two categories, while “How many children do you have?” gives a ratio count. Measuring more detail keeps analysis options open: you can make age bands from years, but cannot recover exact ages from bands.
A dichotomous variable has two categories and is usually analyzed as nominal. With 0/1 coding it has a useful numeric property: its mean is the proportion coded 1. This special interpretation does not extend to every numerically coded nominal variable.
Recognize the limit of ordered codes
A single agreement item from “Strongly disagree” to “Strongly agree” is ordinal. Its codes show order, but the distance from disagreement to neutral need not equal the distance from neutral to agreement. A summated score from several related items is often treated as interval in social research. State that choice in a report because equal spacing is being assumed.
Regions coded 1–6 remain nominal. Neither a higher code nor a one-code difference has substantive meaning. Asking whether order means something, and then whether distances are equal, prevents the mistake of treating every numeric column as a quantity.
Check the software's guess
Software infers a level from values, not from question meaning. Under JASP's default import rules, 3–10 distinct whole-number values are labeled ordinal. A region variable with six codes can therefore get the wrong level. Inspect each column's measurement setting and correct it using the codebook before choosing analyses.
Key Takeaways
- Measurement level comes from how answers were collected.
- Nominal codes label categories; ordinal codes add meaningful order.
- Interval data have equal gaps; ratio data also have a true zero.
- A single agreement item is ordinal.
- State when a combined score is treated as interval.
- Check software measurement settings against the codebook.
2.2 Choose the right analysis for one or two variables
Choosing an analysis starts with two questions: what are you trying to describe, and what information do the variables carry? The same survey can need several methods because its questions measure different kinds of things.
Describe one variable
Univariate analysis describes one variable. Choose summaries its level supports:
| Variable | Useful summaries |
|---|---|
| Nominal | Counts, percentages, bar or pie chart, mode |
| Ordinal | Ordered frequencies, cumulative percentages, bar chart, median and IQR |
| Interval/ratio | Histogram; mean and SD, or median and IQR for skew or outliers |
For example, “Main news source” needs category shares, while “Hours online per day” needs a numeric distribution. A mean news-source code would depend on arbitrary numbering.
Choose the roles of two variables
Bivariate analysis examines a relationship between two variables. The independent variable is the proposed influence; the dependent variable is the proposed outcome. Theory and time order guide the choice. Age can help explain news habits; news habits cannot change age. These roles guide layout and interpretation, even though a correlation has the same value when its variables are swapped.
Multivariate analysis involves at least three variables. Splitting a crosstab by a third variable is one way to check whether the original association persists within groups.
Match the method to both variables
| Pair of variables | Starting method |
|---|---|
| Two nominal, or nominal with ordinal | Crosstab, chi-square and Cramér's V; phi for a 2 × 2 table |
| Two ordinal | Spearman's rho; a crosstab for few categories |
| Two interval/ratio | Scatterplot, then Pearson's r for a roughly linear pattern |
| Ordinal with interval/ratio | Spearman's rho |
| Categorical independent, numeric dependent | Group means and eta |
Kendall's tau-b is another rank-based choice for ordinal variables. In general, the lower measurement level limits the method. Comparing numeric outcomes across nominal groups is a useful exception: group means preserve the outcome's numeric detail without pretending the group codes are quantities.
Apply the choices to a survey
Age group and main news source call for a crosstab with Cramér's V. Age group and a 1–4 trust item suit Spearman's rho, or a crosstab with few categories. Main news source and hours online call for mean hours within each source group and eta. Exact age and hours online can use Pearson's r after checking the scatterplot.
The distribution also matters. Extreme outliers can distort a mean and Pearson correlation; strong skew can make median-based or rank-based summaries more useful. Running Pearson's r between arbitrary region codes and hours online does not solve the problem. Renumbering regions would change the coefficient without changing anyone's region.
Key Takeaways
- Choose a method from the research question and both variables’ levels.
- Use theory and time order to assign independent and dependent roles.
- Use crosstabs for categorical comparisons and rank methods for ordered data.
- Inspect numeric distributions before using means or Pearson’s r.
- Compare numeric outcomes across nominal groups with group means and eta.
3Describe single variables
Before comparing groups or testing relationships, find out what each variable looks like on its own. Frequency tables reveal common answers and missing cases; charts reveal shape and unusual values; center and spread put those patterns into numbers. You will read each percentage with its base and choose descriptions that suit both the measurement level and the observed distribution.
3.1 Build and read frequency tables
A frequency table shows how many cases fall in each value or category. Read its base carefully: a percentage of everyone answers a different question from a percentage of those who answered.
Separate counts and percentage bases
SPSS frequency output distinguishes Frequency, Percent, Valid Percent and Cumulative Percent. Frequency is the count. Percent divides by all cases, including missing cases. Valid percent divides by cases with a valid answer. Reports usually use valid percentages and state the missing count separately.
Suppose 250 respondents were asked how often they use public transport and 10 did not answer. The valid base is 240.
| Answer | Count | Percent of all | Valid percent |
|---|---|---|---|
| Daily | 48 | 19.2 | 20.0 |
| Weekly | 72 | 28.8 | 30.0 |
| Monthly | 55 | 22.0 | 22.9 |
| Less often | 40 | 16.0 | 16.7 |
| Never | 25 | 10.0 | 10.4 |
| Missing | 10 | 4.0 | — |
For daily use, 48 divided by 250 gives 19.2% of all respondents; 48 divided by 240 gives 20.0% of valid answers. The count is unchanged. The denominator explains the difference.
Read cumulative percentages in order
Cumulative percent adds valid percentages down the ordered categories. In this table the cumulative figures are 20.0, 50.0, 72.9, 89.6 and 100.0. Daily plus weekly reaches 50.0%, so half of those who answered use transport at least weekly.
Always read the category order. With categories running from frequent to infrequent use, the running total means “at least this often.” A reversed order would answer a different cumulative question. Nominal categories have no meaningful order, so a cumulative total for religion or region would depend on arbitrary table order.
Group a long numeric distribution
If weekly hours take many values, a separate row for each can hide the pattern. A grouped frequency table might use 0–4, 5–9 and 10–14 hours for whole-hour responses. Use nonoverlapping classes that cover every valid value, usually with equal widths. About five to ten classes often gives a readable overview. With fractional hours, specify boundaries that also place values such as 4.5 unambiguously.
Grouping loses the detail within each class. Keep the original variable for calculations that need exact values.
Interpret the size and precision
The mode is the category with the largest count: “Weekly,” with 72 cases here. The largest cumulative percentage is always at the end and does not identify the mode.
Give the base or counts alongside percentages. A share of 25% can represent one person out of four, so it says little about a stable population pattern. Round percentages to one decimal. Totals of 99.9% or 100.1% can arise from rounding; explain that in a table note instead of changing a category's percentage.
Key Takeaways
- Valid percentages exclude missing answers from the denominator.
- Cumulative percentages require ordered categories.
- Read the mode from category frequencies.
- Grouping numeric data hides detail within classes.
- Report bases and preserve honest rounding.
3.2 Show a distribution with a suitable chart
A useful chart shows the distribution without asking the reader to decode the wrong visual form. Match the chart to the variable, then inspect its labels, scale and shape.
Choose a display for the answers
| Chart | Best use | What to watch |
|---|---|---|
| Bar chart | Nominal or ordinal categories | Separate bars; retain ordinal order |
| Pie chart | A few nominal shares of one whole | Similar slices are hard to compare |
| Histogram | Numeric values grouped into intervals | Touching bars; check interval widths |
| Box plot | Numeric center, spread and unusual values | Read quartiles and whisker settings |
A bar chart can show counts or percentages. Keep satisfaction levels in their natural order. For unordered categories, sorting bars from largest to smallest can make comparisons easier.
A pie chart works best with a few categories, roughly five or fewer. It shows parts of one whole, but a bar chart usually makes small differences easier to see. A multiple-response question can total more than 100% because people select several answers; those selections are not mutually exclusive slices of one whole.
A histogram groups numeric values into intervals. The touching bars represent a continuous numeric axis, unlike the gaps between separate category bars. With equal-width intervals, height shows frequency. If interval widths differ, frequency density is needed so area still represents frequency. A histogram of religious-affiliation codes would wrongly suggest a meaningful numeric order.
Describe the shape
A symmetric distribution has roughly balanced sides. A right-skewed distribution has a long tail toward high values, as can happen with household income or books read. A left-skewed distribution has a long tail toward low values. Name the tail's direction, not the side where most cases cluster.
A bimodal distribution has two peaks. Its mean may fall between the peaks where few cases lie, so the chart adds information a single average misses. An outlier sits far from the other observations. Check its accuracy and meaning before deciding how to handle it.
Use box plots for group comparisons
A box plot marks the median and quartiles, with the box spanning the middle half of the data. Whiskers extend according to the plotting rule, and separate points identify potential outliers. Side-by-side plots of working hours can reveal different spreads or medians across groups even when their means are similar.
Keep visual comparisons honest
Give every chart a title, labeled axes, units and the number of cases. Start bar-chart axes at zero because readers compare bar lengths. Starting an axis at 45% makes 48% and 52% look much further apart than a four-point gap. Avoid three-dimensional effects: perspective changes the apparent size of bars and slices without changing the data.
Key Takeaways
- Use separate bars for categories and a histogram for numeric intervals.
- Describe skew by the direction of its long tail.
- Box plots show median, quartiles and potential outliers.
- Bar lengths need a zero baseline.
- Label units, cases and axes clearly.
- A pie chart requires parts of one whole.
3.3 Summarize center and spread for each level
Center tells you where values cluster; spread tells you how much they differ. Choose both from the measurement level and distribution. One average alone can hide much of a survey's pattern.
Match the measure to the level
| Data | Center | Spread |
|---|---|---|
| Nominal | Mode | Describe how cases are distributed across categories |
| Ordinal | Median or mode | Ordered range or middle-half categories |
| Interval/ratio, roughly symmetric | Mean | Standard deviation |
| Interval/ratio, skewed or with outliers | Median | Interquartile range |
The mode works at every level. The median needs order. The mean and standard deviation need meaningful numeric distances. For ordinal categories, the quartile categories show the middle half; interpreting a subtraction of their codes as an equal-unit distance requires an additional spacing assumption.
Find an ordinal median
Suppose 200 respondents rate job satisfaction from 1, “Very dissatisfied,” to 5, “Very satisfied.” Counts are 10, 25, 40, 60 and 65. Cumulative percentages are 5.0, 17.5, 37.5, 67.5 and 100.0. The middle observations fall in category 4, “Satisfied.” The mode is category 5, which has the largest count. Median and mode describe different features and need not agree.
See what an outlier does
Nine respondents report reading 0, 1, 1, 2, 2, 3, 4, 5 and 40 books last year. The total is 58, so the mean is about 6.4 books. The middle value is 2 books. Removing the value 40 lowers the mean to 2.25, while the median remains 2. The high value pulls the mean upward; the median follows the middle position.
Use the mean with the standard deviation, or SD, for roughly symmetric numeric data. SD describes the scale of distances from the mean in the variable's own units. “Mean weekly hours 37.5, SD 8.2” reports both the center and dispersion. It does not mean every respondent lies within 8.2 hours of the mean.
For skewed data, pair the median with the interquartile range, or IQR, which spans the middle 50%. The full range depends only on the extremes and can stretch sharply when one outlier is added.
Report what the numbers mean
Two groups can each average a 30-minute commute, with SDs of 5 and 20 minutes. The second group has much greater variation. Include units and valid cases: “M = 37.5 hours, SD = 8.2, n = 412.” Use Mdn for the median.
Averaging ordinal trust codes assumes equal distances between categories; say so and also show frequencies. A mean of arbitrary nominal codes, such as region numbers, has no useful meaning. A 0/1 indicator is a special case: its mean gives the proportion coded 1.
Key Takeaways
- Select center and spread together from level and shape.
- Median and mode can identify different categories.
- Outliers can strongly shift the mean and range.
- Report units and valid cases with descriptive statistics.
- A mean of ordinal codes assumes equal spacing.
- A 0/1 mean is a proportion, unlike a mean of arbitrary labels.
4Analyze relationships between two variables
A relationship can appear as different category shares, a trend across numeric values or different average outcomes across groups. You will work through crosstabs, Pearson and Spearman correlations, and group means with eta. The same evidence also raises a design question: whether the pattern could reflect time order, reverse causation or a third variable instead of a direct causal influence.
4.1 Build and read a crosstabulation
A crosstabulation, or contingency table, shows the joint distribution of two categorical variables. Each cell counts cases with a particular combination of answers. Row and column totals are called marginals.
Set up the comparison
Put the independent variable in columns and the dependent variable in rows. Calculate percentages within each column so that every column totals 100%. Then compare one outcome row across the columns. If the independent variable is in rows instead, use row percentages. The denominator is always the group whose outcome you are describing.
A survey of 400 adults asks about age group and main news source. Treat age group as the independent variable and news source as the outcome:
| Main news source | 18–34 | 35–54 | 55 and over |
|---|---|---|---|
| Social media, count | 66 | 54 | 26 |
| Other source, count | 54 | 96 | 104 |
| Column base | 120 | 150 | 130 |
| Social media, column % | 55.0 | 36.0 | 20.0 |
For the youngest group, divide 66 by 120 and multiply by 100. Repeat using each group's own base. The share naming social media falls steadily with age. Across the whole sample it is 146 of 400, or 36.5%.
Keep the denominator tied to the question
Dividing 66 by the 146 social-media users gives 45.2%. This is the percentage of social-media users who are young. It describes the composition of the user group. It does not answer how common social-media news use is among young respondents.
The two percentages can both be correct while answering different questions. Write the denominator in words before calculating: “of the 120 young respondents” or “of the 146 social-media users.” That makes a mistaken comparison easier to spot.
Describe a gap in percentage points
The youngest and oldest groups differ by:
A 35-point difference is not a 35% relative increase. Relative to 20.0%, the share 55.0% is 2.75 times as high, or 175% higher. Percentage points directly compare the two percentages on the same 0–100 scale.
When both variables are ordinal, inspect whether the pattern rises or falls consistently across ordered groups. A directional pattern can be hidden by rearranging categories.
Present stable, readable tables
Many categories spread cases across many cells. Percentages based on a handful of cases can change sharply with one answer. Combine categories only when the grouping makes substantive sense, and show each column's n.
A report table needs a title naming both variables, clearly labeled counts or percentages, group bases, total N and a missing-data note. In a percentage table, include the complementary outcome rows so readers can see how each column reaches 100%.
Key Takeaways
- Percentage within the independent-variable groups.
- Read comparable outcome percentages across groups.
- Reversing the denominator changes the research question.
- Subtract percentages to obtain percentage-point differences.
- Show group bases, total N and missing-data treatment.
4.2 Measure correlation with Pearson's r and Spearman's rho
A correlation compresses a two-variable pattern into a number. First look at a scatterplot, with one dot per case, the proposed independent variable horizontally and the outcome vertically. Inspect direction, form, clustering and outliers.
Read Pearson's r
Pearson's r measures a linear relationship between two interval/ratio variables. It ranges from −1 to +1. Positive values mean high values tend to go together; negative values mean higher values of one variable go with lower values of the other. Strength depends on distance from zero, not the sign: −.70 is stronger than +.30.
In a survey of 120 adults, age and daily social-media time correlate at r = −.45. Older respondents tend to spend less time on social media, with considerable variation around that pattern. The coefficient is not a rate: it does not mean each extra year reduces use by .45 hours. Correlation describes closeness to a straight-line pattern, not its slope.
Square the coefficient for variation
The coefficient of determination is r squared:
About 20% of the variation in social-media time is accounted for by its linear relationship with age. The remaining 80% is variation the straight-line relationship does not account for. It can reflect other influences, curvature or measurement error. Squaring removes the sign; retain r to report direction.
Use ranks when order is the useful information
Spearman's rho calculates a correlation from ranks. It suits ordinal variables and a pattern that moves steadily in one direction even when the pattern curves. It can also help when skew or outliers make Pearson's r a poor summary. Kendall's tau-b is another rank-based measure, often used with many tied values.
Consider x values 1, 2, 3, 4, 5, 6 and corresponding y values 2, 3, 5, 4, 6, 30. Pearson's r is about .74, while Spearman's rho is about .94. Without the final case, Pearson's r is .90. The extreme y value changes numeric distances greatly, but its rank is still simply the highest. A scatterplot helps explain why the coefficients differ. Investigate the case before deciding whether it belongs in the analysis.
Recognize patterns one number can miss
An r near zero means little linear association. A strong U-shaped pattern can still exist because values first fall and then rise. Neither a signed linear coefficient nor a single rank coefficient summarizes that shape well; describe the plot.
A correlation matrix shows every variable as both a row and a column. Each diagonal value is 1, and the upper and lower triangles mirror each other. Read each unique pair once, along with its valid case count and chosen method. A correlation alone cannot establish which variable came first or whether a third variable explains the association.
Key Takeaways
- Inspect a scatterplot before choosing a coefficient.
- Pearson’s r describes linear direction and strength, not slope.
- Square r to describe linearly associated variation.
- Spearman’s rho works on ranks and can summarize a monotonic curve.
- A near-zero r can hide a strong curved relationship.
- Read mirrored correlation-matrix entries only once.
4.3 Compare group means and calculate eta
When an outcome is numeric but the proposed influence is categorical, compare the outcome within groups. This keeps the outcome's numeric information without pretending group codes are quantities.
Start with means, spread and group sizes
For each group report its mean, SD and valid n. Side-by-side box plots can show whether a mean difference reflects a broad shift or a few unusual values. If the outcome is strongly skewed, compare medians as well as, or instead of, means.
Consider life-satisfaction scores on a 0–10 scale:
| Employment group | Scores | Mean | SD | n |
|---|---|---|---|---|
| Employed | 5, 8, 6, 9 | 7 | 1.83 | 4 |
| Unemployed | 3, 6, 4, 7 | 5 | 1.83 | 4 |
| Retired | 7, 9, 6, 10 | 8 | 1.83 | 4 |
Each group has four cases; the overall mean is about 6.67. The unemployed group scores lowest and the retired group highest. The group codes have no numeric distance, so correlating those codes with satisfaction would make the result depend on the numbering.
Measure between-group variation
Eta, written η, measures the strength of the relationship between a categorical independent variable and a numeric outcome. It ranges from 0 to 1 and has no sign. Read the direction of differences from the group means.
Eta squared, η², is the share of total outcome variation that lies between the groups. First calculate the between-group sum of squares: multiply each squared distance between a group mean and the overall mean by that group's size. Using the unrounded overall mean gives:
This is about 18.67. Next add squared distances of individual scores from their own group mean. Each group contributes 10, so the within-group total is 30. Total variation is about 48.67.
Taking the square root gives η of about .62. About 38% of the sample variation lies between these employment groups. It is not a claim that employment caused 38% of each person's satisfaction.
Separate a pattern from its significance
Eta can capture a middle group scoring below both ends because it does not require a straight-line trend. A t test commonly tests equality of two population means; a one-way ANOVA, with an F test, commonly tests equality of three or more.
Read their p-values separately from eta squared. These 12 observations give F(2, 9) = 2.80, p about .11, despite η² of .38. A large descriptive difference in a tiny sample can remain statistically nonsignificant.
Key Takeaways
- Compare a numeric outcome within categorical groups.
- Report group means with SDs and valid case counts.
- Eta has no sign; inspect the means for direction.
- Eta squared divides between-group variation by total variation.
- Effect size and statistical significance answer separate questions.
4.4 Judge whether a relationship could be causal
An association is a pattern to explain, not a causal conclusion by itself. A causal claim needs an association, the proposed cause occurring before the outcome, and a relationship that is not produced by a third variable. A plausible mechanism strengthens the explanation.
Check time order
Most surveys are cross-sectional: variables are measured at one time. People who trust news may watch more news, but watching news may also build trust. This is reverse causation. A survey association alone does not settle the direction. Some characteristics, such as year of birth, have a clear earlier position, but that still leaves third-variable explanations to examine.
Compare the pattern within a third variable
A spurious relationship occurs when a third variable affects both variables and produces their association. Elaboration checks the pattern within categories of that third variable, using separate partial tables. Software may call this a layered or three-way crosstab.
Suppose 150 of 200 print-newspaper readers voted, or 75.0%, compared with 190 of 300 nonreaders, or 63.3%. Now split by age:
| Age group | Readers who voted | Nonreaders who voted |
|---|---|---|
| Under 50 | 30 of 50: 60.0% | 150 of 250: 60.0% |
| 50 and over | 120 of 150: 80.0% | 40 of 50: 80.0% |
The within-age gaps are both zero. Readers include many more older people, and older people vote more. In this example, age accounts for the overall readership–voting gap. The pooled percentages mixed groups with different compositions.
Distinguish different third-variable roles
A disappearing association can also fit an intervening pathway, or mediation: the proposed cause changes a middle variable, which changes the outcome. For example, education may raise income, which improves health. The table pattern alone cannot distinguish a common cause from a causal pathway; theory and time order are needed.
A moderator changes the strength or direction of a relationship. If the age–social-media pattern is strong among people without a degree and weak among degree holders, education moderates it. Report group-specific relationships; one overall coefficient would hide the difference.
If the original relationship stays similar within every group, that particular third variable does not explain it. Other unmeasured variables may still matter. Checking one variable does not settle every competing explanation.
Match the wording to the evidence
Write “is associated with,” “tends to” or “Younger respondents were more likely to name social media.” Reserve “causes” or “leads to” for evidence from a design that supports the causal claim. Statistical significance measures evidence against a null model; it cannot supply missing time order or eliminate an unmeasured common cause.
Key Takeaways
- Causal claims need association, time order and non-spuriousness.
- Layered tables compare the original relationship within a third variable.
- A common cause and an intervening pathway can produce similar table patterns.
- A moderator changes a relationship across groups.
- Use association wording for cross-sectional survey findings.
5Report significance and effect sizes
A research finding needs both an account of the pattern and a judgment about the evidence. You will read chi-square and other test output, interpret p-values, and measure association strength with effect sizes. Then you will combine direction, size, significance and sample information in clear tables and sentences, keeping statistical significance separate from practical importance.
5.1 Test a crosstab with chi-square
A crosstab shows a sample association. The chi-square test of independence asks how unusual its departures from independence would be under a population model of no relationship. Start with counts, then check the test's conditions.
Calculate the counts under independence
The null hypothesis says the variables are independent in the population. Under that hypothesis, a cell's expected count comes from its marginals:
In the news-source table, 146 of 400 respondents use social media and 120 are aged 18–34. The expected count for that combination is 146 × 120 ÷ 400 = 43.8. The observed count is 66. Expected counts need not be whole numbers: they describe a model, not a fresh set of people.
Combine all the departures
Chi-square adds a contribution from every cell:
Here O means observed count and E expected count. Squaring makes both excesses and shortfalls contribute positively. Dividing by E puts departures on a scale relative to their expected size. A single cell does not give the full statistic.
Degrees of freedom depend on the table shape:
Two news-source rows and three age columns give 2 degrees of freedom. The whole table produces χ² = 33.01 and a very small p-value, reported as “χ²(2, N = 400) = 33.01, p < .001.”
Check whether the test is appropriate
Use a probability sample for the population interpretation taught here. Each independent case must contribute to exactly one cell. The table must contain counts, not percentages. Using percentages changes the apparent number of cases and therefore the test.
Check expected, not observed, counts. A common rule is that no more than 20% of cells have expected counts below 5, and none is below 1. The news table's smallest expected count is 43.8, comfortably above those limits. If the rule fails, combine substantively compatible categories; for a 2 × 2 table, Fisher's exact test is an alternative.
Read the right output row
Chi-square measures evidence of association, not its direction or strength. Compare group percentages for the pattern and use phi or Cramér's V for strength. Increasing the sample size while preserving proportions increases chi-square.
Some software also reports Yates' continuity correction for 2 × 2 tables. It makes chi-square smaller and p larger. SPSS displays it separately; R's chisq.test() uses it by default for 2 × 2 tables. State the version and keep settings consistent when comparing software results.
Key Takeaways
- Expected counts come from row total × column total ÷ N.
- Chi-square combines departures over every cell.
- Check expected counts, independent cases and the sampling basis.
- Use raw counts, not a percentage table, for the test.
- Report the chosen correction and use an effect size for strength.
5.2 Interpret p-values and statistical significance
A small p-value means the observed result would be unusual under the null hypothesis. It does not measure the chance that a researcher's explanation is true. Interpretation starts by naming the null model and the sampling basis.
Compare p with a planned threshold
A p-value is the probability, under the null hypothesis and the test's assumptions, of a result at least as extreme as the one observed. For a test of association, the null hypothesis is no population relationship. Choose alpha, the significance threshold, before testing; .05 and .01 are common choices.
If p is below alpha, reject the null hypothesis and call the result statistically significant. A p-value of .03 passes alpha .05 but not alpha .01. If p exceeds alpha, the evidence is insufficient to reject the null at that threshold. It is not evidence that the null is certainly true.
Keep probability in the right direction
The calculation starts by assuming the null model and asks about possible data. It does not begin with the observed data and calculate the probability that the null is true. Neither p nor 1 − p is the probability that a research hypothesis is correct.
For a probability sample, tests support inference to the population sampled. A convenience sample, such as respondents following a shared survey link, lacks that design-based interpretation. A small p-value does not repair selection bias. With a whole-population census, there is no sampling uncertainty to generalize from in that same sense.
Read the test for the analysis
For Pearson correlation, the usual test asks whether the population correlation is zero and uses n − 2 degrees of freedom. With 120 valid cases, report “r(118) = −.45, p < .001.” Spearman uses its own testing procedure: report rho, valid N and its software p-value without attaching Pearson's degrees of freedom.
For group means, a t test commonly asks whether two population means are equal; an ANOVA F test commonly asks whether three or more means are equal. A significant overall F test indicates that the population means are not all equal; it does not identify every differing pair.
Separate sample size, effect size and repeated tests
The same correlation, r = .20, has p about .16 with 50 cases but p below .001 with 1,000. The association is equally strong in the two samples; the larger sample provides more precise evidence. Conversely, a large effect in a small sample can remain nonsignificant.
Running many tests increases opportunities for false positives. At alpha .05, about one in twenty tests of truly unrelated variables is expected to be significant by chance; 40 such tests yield about two on average. Plan analyses from research questions and report the testing strategy instead of highlighting only small p-values.
Key Takeaways
- A p-value describes data under a null model, not the probability the model is true.
- Choose alpha before inspecting results.
- Nonsignificance leaves uncertainty about a relationship.
- Sampling method determines the population interpretation.
- Sample size changes significance without necessarily changing effect size.
- Plan analyses to limit selective reporting from many tests.
5.3 Measure and judge effect sizes
An effect size describes the strength of an association or difference. Statistical significance describes evidence against a null model. Report both so readers can judge the size of a pattern and the evidence behind it.
Put categorical gaps into familiar units
A percentage-point difference directly compares two group shares. Social-media news use of 55.0% and 20.0% differs by 35 points. Keep the underlying percentages and group bases visible: a gap is easier to interpret when readers know what was compared.
Phi summarizes association in a 2 × 2 table. Its magnitude is:
Some software signs phi according to category coding. The magnitude ranges from 0 to 1. For larger tables use Cramér's V:
Here k is the smaller number of rows and columns. For 2 × 2 tables V equals the absolute value of phi. Use the ordinary Pearson chi-square without a continuity correction for these standard effect-size calculations.
Work through the table-size adjustment
For the news table, χ² = 33.01, N = 400 and k = 2:
Cramér's V measures strength without direction. Read which group has the larger share from the percentages. If the same proportions were observed in a larger sample, the numerator and denominator would grow together; effect size would stay the same even as significance changed.
Use squared measures for variation
For a linear numeric relationship, r squared describes the share of variation associated with that relationship. An r of −.45 gives about .20, or 20%. Eta squared describes the share of numeric outcome variation lying between categorical groups. A value of .38 means 38% of the sample variation lies between groups. Neither interpretation establishes a causal contribution.
Judge size in context
Cohen's benchmarks are rough conventions:
| Measure | Small | Medium | Large |
|---|---|---|---|
| Absolute r or phi | .10 | .30 | .50 |
| V, k − 1 = 1 | .10 | .30 | .50 |
| V, k − 1 = 2 | .07 | .21 | .35 |
| V, k − 1 = 3 | .06 | .17 | .29 |
| Eta squared | .01 | .06 | .14 |
The news table's V of .29 is close to the medium benchmark for k − 1 = 1. Applying the wrong table-size row changes the label. Benchmarks help orientation, but topic and earlier research determine practical importance. A small turnout difference can matter across a large population, while a significant but tiny difference may have little practical value in another setting.
Key Takeaways
- Effect size measures magnitude separately from significance.
- Phi suits 2 × 2 tables; Cramér’s V adjusts for larger tables.
- Use the smaller table dimension when calculating V.
- r squared and eta squared describe shares of variation.
- Interpret conventional benchmarks in the research context.
5.4 Write up quantitative results in a research report
A results section should let readers connect a research question to evidence. Move from the sample and its characteristics to descriptions of the main variables, then to the relationships that answer the questions. Use the discussion to explain their broader meaning.
Build a table a reader can use
Give each table a number and a title naming the variables and sample. For example: “Table 2. Main news source by age group, adults aged 18 and over (column percentages).” Include the column bases, total N, missing-data treatment and data source. Label counts and percentages so the denominator is clear.
Use consistent precision within columns: percentages to one decimal and most statistics to two decimals. A percentage of 36.4723% becomes 36.5%, not an impression of greater measurement accuracy. Use a decimal point and a thousands comma in American English: 1,250 respondents.
Use standard statistical notation
APA style uses italics for Latin statistical symbols such as N, n, M, SD, r, p, t, F and V. Greek symbols such as χ and η remain in standard type. Omit the leading zero for statistics bounded by 1 in magnitude, such as r = .45, p = .03 and V = .29. Keep it for statistics that can exceed 1, such as M = 0.82.
Give exact p-values to two or three decimals when they are at least .001. For smaller values write p < .001. Software displaying “.000” has rounded a small value; it has not shown a probability of exactly zero.
Write the pattern, size and significance
A crosstab sentence can combine the direction, key percentages and formal result:
“Younger respondents were more likely to name social media as their main news source: 55.0% of those aged 18–34, compared with 36.0% at 35–54 and 20.0% at 55 and over, χ²(2, N = 400) = 33.01, p < .001, V = .29.”
For a correlation, write:
“Age was moderately and negatively correlated with daily social-media time, r(118) = −.45, p < .001; about 20% of the variation in time was associated with the linear relationship.”
A coefficient without words leaves readers to infer the substantive meaning. A paragraph repeating every cell makes the table redundant. Select the comparison that answers the question and point to the table for detail.
State limits that affect interpretation
Report sampling and missingness alongside the findings. Cross-sectional data leave time order and third-variable explanations unresolved. Non-probability recruitment limits population generalization. Question wording and missing answers can affect what the figures represent. If many tests were run, make that clear so a small p-value is not read in isolation. State these concrete limits without discarding the descriptive patterns the data support.
Key Takeaways
- Organize results around the research questions.
- Label tables with variables, bases, units and missing-data treatment.
- Use consistent APA-style symbols and precision.
- Report rounded software p-values of .000 as p < .001.
- Interpret direction, effect size and significance in words.
- State the design and data limits relevant to the finding.
6Carry out the analysis in statistical software
The same research question can be analyzed in SPSS, R or JASP if the variables, cases and options match. You will connect the data-preparation steps to each program, locate the main analyses and identify the output needed for a report. Saving syntax, scripts or project settings makes the work repeatable and helps explain discrepancies caused by missing data or different test options.
6.1 Set up and prepare a data file in SPSS, R or JASP
SPSS, R and JASP can all prepare and analyze survey data. SPSS combines menus with syntax; R uses commands saved in scripts, often through RStudio; JASP uses menus and saves data with analysis settings. Whichever you choose, begin with a codebook and an unchanged raw file.
Define variables in SPSS
Data View displays cases in rows and variables in columns. Variable View displays one row per variable. Set Name, Type, Label, Values, Missing and Measure. A numeric storage type does not establish a numeric measurement level.
For q7_trust, enter labels for valid values 1–4, declare 8 and 9 as user-missing, and choose Ordinal under Measure. SPSS uses Scale for interval/ratio variables. Save the data as a .sav file. Use Paste in analysis dialogs to record the menu settings as syntax, then save that syntax separately.
Import and prepare data in R
Read a CSV into a data frame, a table of variables with one row per case:
survey <- read.csv("survey.csv")
survey <- transform(survey,
q7_trust = replace(q7_trust, q7_trust %in% c(8, 9), NA))
survey$trust_ordered <- factor(survey$q7_trust,
levels = 1:4,
labels = c("Not at all", "Not very much", "Quite a lot", "A great deal"),
ordered = TRUE)
The replacement changes missing codes to NA. The factor attaches labels and order to the remaining codes. Keep the numeric and labeled versions clearly distinguished. haven::read_sav("survey.sav") imports an SPSS file; inspect imported labels and missing-value handling before analysis.
Use cut() to form numeric groups and arithmetic to reverse items, such as 6 - item for valid 1–5 responses. Set missing codes to NA first. Many functions need na.rm = TRUE or use = "complete.obs" to omit missing cases in the intended way.
Inspect JASP's import choices
JASP opens CSV and SPSS files. Its default import rules treat two distinct integer values as Nominal, three to ten as Ordinal and more than ten as Scale. Inspect each column icon and correct it against the codebook; six unordered region codes still need Nominal. Add special missing codes to the missing-value list and confirm them in frequencies.
JASP's computed columns can use drag-and-drop formulas or R code. Save a .jasp file to retain data, analyses and settings. SPSS recoding is under Transform > Recode into Different Variables, with calculations under Transform > Compute Variable.
Preserve a repeatable workflow
Save the input file, codebook and preparation record together. In SPSS the record is syntax, in R a script, and in JASP the saved project and its settings. After preparation, inspect frequencies and old-by-new crosstabs. A saved file is useful evidence only when the labels, missing rules and transformations behind it are also clear.
Key Takeaways
- Check labels, missing codes and measurement levels after import.
- SPSS separates Data View from Variable View.
- R represents missing values with NA and categories with factors.
- Correct JASP’s automatic level assignments when needed.
- Save syntax, scripts or project settings to repeat the work.
6.2 Run analyses and read the output
Software output becomes evidence only after you identify the method, valid cases and settings behind it. Run descriptive checks first, then the analysis that answers the research question.
Produce single-variable summaries
In SPSS, use Analyze > Descriptive Statistics > Frequencies, with chart options when needed. In JASP, use Descriptives and switch on frequency tables for categorical variables. In R, table() counts categories and prop.table() converts counts to proportions. Multiply proportions by 100 for percentages. Missing values need explicit handling if you want them displayed.
Run and read a crosstab
SPSS uses Analyze > Descriptive Statistics > Crosstabs. Put the outcome in rows and the proposed influence in columns. Under Cells request column percentages and expected counts. Under Statistics choose Chi-square and Phi and Cramer's V. JASP provides these choices under Frequencies > Contingency Tables.
The equivalent R sequence is:
tab <- with(survey, table(news_source, age_group))
100 * prop.table(tab, margin = 2)
result <- chisq.test(tab, correct = FALSE)
result$expected
result
Here margin = 2 uses column totals. The explicit correction setting selects the ordinary Pearson version, including for 2 × 2 tables. The same table and setting must be used when deriving phi or V.
In SPSS's Chi-Square Tests output, read the Pearson Chi-Square row: Value, df and Asymptotic Significance (2-sided). Check the footnote for the proportion of expected counts below 5 and the minimum expected count. A separate Continuity Correction row is a different version of the test.
Select correlations and mean summaries
SPSS offers Pearson and Spearman under Analyze > Correlate > Bivariate. JASP offers them under Regression > Correlation. In R, set the method explicitly:
with(survey, cor(age, hours_online,
method = "spearman", use = "complete.obs"))
with(survey, cor.test(age, hours_online, method = "spearman"))
cor() returns a coefficient; cor.test() adds a test and p-value. Both default to Pearson when method is omitted. Compare their valid cases and options before treating results as equivalent.
For group means, use SPSS Analyze > Compare Means > Means, selecting “Anova table and eta” under Options. In R, aggregate() or tapply() gives means by group. In JASP, split Descriptives by the group variable and use ANOVA for its test and eta squared.
Turn output into a report
R can print p-value = 6.805e-08, meaning 6.805 × 10⁻⁸; report p < .001. Retain group bases, test statistics and effect sizes, round consistently and build a clean report table.
When programs disagree, first compare missing values, valid cases, filters, measurement settings and corrections. With the same data and options, their results should agree. Extra decimal places or a different output label do not create a substantive difference.
Key Takeaways
- Use the analysis method and missing-value settings deliberately.
- R’s column proportions use margin = 2.
- Read the Pearson Chi-Square row and expected-count footnote.
- Specify Spearman explicitly in both cor() and cor.test().
- Compare cases and corrections when software results differ.
- Build a readable report from output instead of pasting it wholesale.
Analyzing Quantitative Data examples
1Turn questionnaire answers into an analysis file
14 steps
- 1IntroductionFrom answers to a usable file
A survey file must preserve what respondents meant while letting software count and compare their answers. Follow a small community survey through three preparation decisions: how to code its answers, how to check the entries and how to create a score.
Keep the original responses unchanged so every correction can be traced and every transformation can be repeated.
- 2ExplanationGive each row and column a meaning
One case is a respondent; one variable is a characteristic or answer; one value is that respondent’s entry on that variable. Give each case an ID and each variable a short name such as
q7_trust.The codebook supplies the full question, value labels, missing rules and measurement level. Keep direct identifiers out of the analysis file to protect confidentiality.
- 3ExampleDefine a trust question
For “How much do you trust the national parliament?”, record 1 = “Not at all,” 2 = “Not very much,” 3 = “Quite a lot” and 4 = “A great deal.”
Add 8 = “Don’t know” and 9 = “No answer,” declare both missing, and set the level to Ordinal. These definitions belong in the codebook and in the software, so the same numbers carry the same meaning throughout the analysis.
- 4ExplanationAllow more than one selection
The question “Which local services have you used? Select all that apply” can give several answers for one person. Create one variable per service, coded 1 for selected and 0 for not selected.
A respondent who used both a library and a park gets a 1 in both columns. If an export stores all selections in one text cell, split it before counting individual services.
- 5ChallengeChoose a missing code
A survey accepts respondents of every adult age. Would 99 work as a special code for an unanswered age? Explain the problem.
---reveal---
A respondent can genuinely be 99, so the same value would mix a real age with a missing answer. Choose a value outside the valid range, such as −9, and declare it missing. Separate codes can preserve reasons such as refusal and routing.
- 6ExampleFind a code outside the range
A frequency table for the trust question contains one response of 6. The codebook permits only 1–4, 8 and 9, so 6 fails a range check.
Use the respondent ID to consult the original answer. Correct the entry if it can be recovered; otherwise set it missing. Record what changed and why in a cleaning log or script.
- 7ConnectionCheck related answers too
A respondent’s employment code says “No paid job,” while paid working hours equal 40. Both values are individually possible, but together they conflict with the questionnaire’s routing.
This is a consistency check. Inspect the original answers and routing before deciding what to correct. Range checks alone cannot find every problem in a data file.
- 8ExampleSee a missing code change the mean
Ages 25, 40 and 31 are valid; 99 is an unanswered-age code. If the program treats all four numbers as ages, the mean is:
Declaring 99 missing changes the calculation to:
The respondents did not change. The first result was distorted because a missing code entered both the total and the case count.
- 9ChallengeCount the cases actually analyzed
A survey has 80 respondents. Five lack age, seven lack trust and two lack both. How many complete cases can an age–trust analysis use?
---reveal---
Ten distinct cases are missing at least one answer: 5 + 7 − 2. The analysis uses 70 cases. Subtracting both missing counts without accounting for overlap would wrongly exclude the two shared cases twice.
- 10ExplanationAlign scale items before adding them
A connection scale includes “I feel supported” and “I often feel left out,” both scored 1–5 for agreement. Their directions differ. High agreement with the second statement must become a low connection score.
For valid 1–5 answers, reverse with 6 minus the old value. A 5 becomes 1 and a 2 becomes 4. Missing values stay missing.
- 11ExampleBuild and interpret a total
A respondent’s four item scores are 4, 3, 5 and 2. The third item is negatively worded, so its 5 becomes 1. The aligned scores total 10; their mean is 2.5.
For complete responses, four 1–5 items sum to 4–20, while the mean keeps the 1–5 range. Check that the items measure the same concept before combining them, and record the scoring and missing-item rules.
- 12TipInspect the mapping after a recode
After grouping ages, crosstab the original ages against the new bands. Check boundary values, such as 34 and 35, and confirm that each valid age enters exactly one intended group.
Missing codes need the same attention: an age code of 99 must not slip into “55 and over.” Retain exact age as a separate variable because grouping discards detail.
- 13ChallengeRepair a preparation sequence
An analyst groups ages, then declares 99 missing in the original age variable. The grouped variable now includes those cases among older respondents. What must be repaired?
---reveal---
Recreate or correct the grouped variable so those cases stay missing. Changing the original’s missing setting afterward does not reliably undo an existing recode. Verify the old-by-new mapping and record the corrected preparation sequence.
- 14RecapA traceable preparation record
Your finished preparation record should connect each analysis variable to the questionnaire and its transformation rules.
Keep the raw file, a codebook, a cleaning record and the prepared copy. Check allowed values, related answers, missingness and new-variable ranges. The valid case count is part of every later result, so unexpected changes in it are a reason to inspect preparation before interpreting findings.
2Choose an analysis from the questions you asked
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionStart with the meaning of the values
- 2ExplanationSeparate labels from order
- 3ExplanationDistinguish equal gaps and true zero
- 4ExampleNotice what the answer format changes
- 5ChallengeCorrect an import guess
- 6ExplanationDescribe one variable first
- 7ExampleMatch two variables to a method
- 8Key InsightGive the variables research roles
- 9ChallengeChoose between ranks and category means
- 10ChallengeConnect level, shape and choice
- 11RecapKeep the decision path visible
3Describe a distribution without hiding its base
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFind out what the answers look like
- 2ExampleFind the valid base
- 3ExampleRead a running total
- 4TipKeep small bases in view
- 5ChallengeChoose the denominator
- 6ExplanationUse different charts for categories and quantities
- 7ExampleName the tail’s direction
- 8ChallengeRepair a misleading bar chart
- 9ExampleLocate an ordinal middle
- 10ExampleWatch one extreme value shift a mean
- 11Key InsightCenter needs a measure of spread
- 12ChallengeChoose a description from the distribution
- 13ChallengeCombine the table, chart and summary
- 14RecapA distribution a reader can reconstruct
4Compare groups, read correlations and check explanations
19 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionAsk how one variable differs with another
- 2ExampleBuild the news-source comparison
- 3ExampleCalculate within each age group
- 4ChallengeInterpret the gap accurately
- 5ExplanationRead a plot before its coefficient
- 6ExampleKeep sign separate from variation
- 7ExplanationUnderstand what a rank correlation changes
- 8ChallengeDiagnose a near-zero correlation
- 9ExampleCompare outcomes within groups
- 10ExampleCalculate between-group variation
- 11ExampleTurn the variation into eta squared
- 12ChallengeRead size and uncertainty separately
- 13ExplanationAsk what a causal claim needs
- 14ExampleNotice a pooled turnout gap
- 15ExampleCompare within age groups
- 16Key InsightDistinguish a pathway from a common cause
- 17ChallengeRecognize a moderator
- 18ChallengeCombine the statistical and design choices
- 19RecapReport the pattern and its possible explanation
5Read a test and write a useful finding
19 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionSeparate evidence from magnitude
- 2ExplanationSet the independence model
- 3ExampleCalculate one expected count
- 4ExampleCombine departures and read the result
- 5TipCheck expected counts and independent cases
- 6ChallengeCheck the small-cell condition
- 7ExplanationPut a p-value into words
- 8ExampleHold size fixed while changing the sample
- 9ChallengeRepair a probability reversal
- 10ConnectionKeep recruitment and testing visible
- 11ExplanationChoose a strength measure
- 12ExampleCalculate Cramér’s V
- 13Key InsightInterpret squared measures as shares
- 14ChallengeDo size and significance agree here?
- 15ExampleCompose the substantive comparison
- 16TipFormat output for the reader
- 17ChallengeRepair a result copied from software
- 18ChallengeDecide what belongs beside a finding
- 19RecapA complete result answers several questions
6Run a repeatable analysis and check the output
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionThe same analysis across three programs
- 2ExplanationDefine the file in SPSS
- 3ExampleReplace a missing code in R
- 4TipCheck JASP’s measurement icons
- 5ChallengeCheck setup before analysis
- 6ExampleRequest a crosstab in the menus
- 7ExampleWrite the crosstab in R
- 8ExplanationRead the statistic and its conditions
- 9ChallengeExplain a cross-program mismatch
- 10ExampleRequest the intended correlation
- 11ConnectionFind the group summaries
- 12ChallengeCheck cases before comparing findings
- 13ChallengeLeave a reproducible result
- 14RecapSave choices with the findings
Analyzing Quantitative Data practice questions
Set 1: Choose summaries that fit the variables10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Prepare and check a survey file10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Interpret relationships in survey data10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Judge significance and practical importance10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Use software and read its output10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
na.rm = TRUE?Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
prop.table(tab, margin = 2) return?Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 6: Review an analysis from data to report10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Alpha
Analysis filter
APA style
Association
B
Bar chart
Between-group sum of squares
Bimodal distribution
Bivariate analysis
Box plot
C
Case
Cell
Chi-square test of independence
Codebook
Coding frame
Coefficient of determination
Column percentage
Column proportion
prop.table(tab, margin = 2), corresponding to 35% within that cell’s column.Computing
Consistency check
Correlation matrix
Cramér’s V
Cronbach’s alpha
Cross-sectional survey
Crosstabulation
Cumulative percentage
D
Data frame
read.csv(), the survey data frame contains one row for each imported respondent.Data matrix
Degrees of freedom
Dependent variable
Dichotomous variable
Double entry
Dummy variable
E
Effect size
Effect-size benchmark
Elaboration
Eta
Eta squared
Expected count
F
Factor
False positive
False precision
Fisher’s exact test
Frequency table
G
Group mean
Grouped frequency table
H
Histogram
I
Independent variable
Interquartile range
Interval measurement
Intervening variable
K
Kendall’s tau-b
L
Listwise deletion
M
Marginals
Mean
Median
Missing-value code
Mode
Moderating variable
Monotonic relationship
Multiple-response question
Multivariate analysis
N
NA
NA is R’s marker for a missing value, which functions handle through their own missing-value settings and arguments.NA before calculating a mean with na.rm = TRUE.Nominal measurement
Null hypothesis
O
Ordinal measurement
Outlier
P
P-value
Pairwise deletion
Pearson’s r
Percentage-point difference
Phi
Pie chart
Practical importance
Probability sample
R
Range
Range check
Ratio measurement
Recoding
Results section
Reverse causation
Reverse coding
S
Scale variable
Scatterplot
Scientific notation
Skew
Spearman’s rho
Spurious relationship
Standard deviation
Statistical output
Statistical significance
Straightlining
Summated scale
Syntax
U
Univariate analysis
V
Valid case count
Valid percentage
Value
Variable
Variable View
W
Within-group sum of squares
Y
Yates’ continuity correction
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.