1.26 Connecting Data and Probability

Variables

  • Explanatory or Independent Variable(s):
    variable(s) that may explain the change in the variable of interest

  • Response or Dependent Variable(s)

    • variable(s) of interest we measure on observational units
  • observational unit - what is measured.
    e.g. individuals for height, polls, etc., lifetime for mechanical parts, …

  • Goal: Show changes in the explanatory variable affect the response variable
    cause-and-effect relationship

Review: Associations vs. Cause and Effect

  • Confounding variables affect both the explanatory and response variables

    • Things that aren’t measured
    • Things you can’t control

Simba, flying in from the left to hit zazu, who was sitting on a rock

Study Design – Populations

An urn shape containing 29 pink balls, 31 orange balls, 187 yellow balls, 26 green balls, 46 teal balls, 51 cyan balls, and 46 purple balls.
Figure 1: The population is the group we want to make statements about
A sample of 20 balls from the urn, containing 3 pink, 1 orange, 8 yellow, 2 green, 2 teal, 3 cyan, and one purple ball.
Figure 2: The sample is the group we measure/test/experiment on

To generalize, we need to argue that the sample is representative of the population

Study Design – Populations

In a random sample,
every item in the population has an
equal chance to be selected.

  • Probability \(\Rightarrow\) this is representative.

A random sample of 20 balls from the urn, containing 3 pink, 1 orange, 8 yellow, 2 green, 2 teal, 3 cyan, and one purple ball.

Random sample of 20 balls

In a convenience sample,
we measure the most convenient items.

  • May be representative (or not) – details matter.

A convenience sample of 20 balls from the urn, containing 3 pink, 0 orange, 8 yellow, 1 green, 1 teal, 4 cyan, and 3 purple balls.

Convenience sample of 20 balls (top layer + a few from the next layer)

A random sample means that the sample is representative of the population
We can generalize results to the population.

Study Design – Experiments

In an experiment, the researcher assigns participants to conditions.

A group of 8 stick figures with different hairstyles. For each basic hairstyle (hat, short hair, ponytail, spikes) there are two individuals with slight variations on the theme.

People in the sample

 

Four individuals, each with a different hairstyle.

Experiment Group A

Four individuals, each with a different hairstyle.

Experiment Group B
  • With random assignment, any pre-existing difference in the groups is due to chance.

  • This allows us to detect cause-and-effect relationships

Additional Assumptions

  • Surveys, convenience samples, etc. are common

  • It’s not always possible (or ethical) to do controlled experiments

  • Statistical models assume that the samples behave like random samples, but

    • We have to mention the assumptions we are making
    • We have to be careful about the conclusions

All models are wrong, but some are useful. – George Box

Sources of Variability

  • Measurement error

  • Natural variation

  • Sampling – which items were in the sample?

Probability is a useful way to handle all of these different types of variability

But, that doesn’t mean they’re the same!

A spaghetti plot of density functions that roughly follow a normal curve centered at 98 degrees. The x-axis shows Temperature (deg F) and the y axis shows density.

A histogram of Stat 1080 attendance, with most days having between 20 and 30 students. The overall range lies between 12 and 36 students.

100 samples from the urn of marbles demonstrating that some variability is due to sampling error.