Lab 3: Normal Distributions and Z-Scores in R

Author

Your Name Here

Published

March 25, 2026

Setup Instructions

  1. Download lab3.qmd from bCourse under “labs” > “Lab #3”
  2. Place lab3.qmd in your labs folder. Your folder structure should now look like this:
soc106/
├── _quarto.yml
├── data/
│   └── attain.csv
├── assignments/
│   └── hw1.qmd
│   └── hw2.qmd
│   └── hw3.qmd
│   └── hw4.qmd
│   └── hw5.qmd
└── labs/
    ├── lab1.qmd
    ├── lab2.qmd
    └── lab3.qmd
  1. Use the Explorer button on the left to find and open lab3.qmd
  2. Let’s work through it together!

Load Libraries

# load libraries
library(tidyverse)

Function Quick Guide

Type of question R function
Cumulative probability P(X ≤ x) pnorm(x, mean = mu, sd = sigma)
Probability above P(X > x) 1 - pnorm(x, mean = mu, sd = sigma)
Probability between P(a < X < b) pnorm(b, mean, sd) - pnorm(a, mean, sd)
Percentile cutoff qnorm(q, mean = mu, sd = sigma)
Standardize a value (x - mu) / sigma

Question 1: Normal Model and Z-Scores (Vehicle Speeds)

Assume speeds are approximately normal with mean 71 mph and standard deviation 8 mph.

  1. Compute the z-score for 65 mph and 80 mph.
  2. Compute P(speed <= 65).
  3. Compute P(speed > 80).
  4. Find the speed cutoff where only 10% of vehicles are faster.
# Your code here

Question 2: Z-Score Practice (Heights)

Assume adult heights are approximately normal with mean 69 inches and standard deviation 3 inches.

  1. Compute the z-score for a person who is 75 inches tall.
  2. Use pnorm() to estimate the percentile for 75 inches.
  3. Find the 95th percentile height using qnorm().
  4. In one sentence: based on your results, is 75 inches above the 95th percentile?
# Your code here

Question 3: Probabilities Above and Between

Suppose SAT math scores are approximately normal with mean 520 and standard deviation 80.

  1. Use pnorm() to find the proportion of students who score above 640.
  2. Use pnorm() to find the proportion who score between 440 and 640.
# Your code here

Wrap-Up

In this lab, you practiced:

  • Computing and interpreting z-scores
  • Using pnorm() to find cumulative normal probabilities
  • Using 1 - pnorm() to find probabilities above a threshold
  • Using differences of pnorm() to find probabilities between two values
  • Using qnorm() to find percentile cutoffs

TipBefore You Leave