Welcome to STAT 200

STAT 200 - Lecture 1

Randomness and Uncertainty

Is smoking bad for your health?

  • How did the medical community conclude that smoking is harmful?

  • Why is this not a trivial conclusion?

  • In fact, this conclusion was disputed for years before it was widely accepted.

Is smoking bad for your health?

  • In 1950, Richard Doll and Richard Peto launched a large-scale prospective observational study with over 40,000 doctors in England.

  • This study provided the first widely accepted evidence that smoking is associated with many diseases.

  • You can learn more about this study here and here.

New drugs

  • There were over 100 different types of vaccines being tested for COVID-19.

  • But how do we determine that a vaccine actually works?

    • Some vaccinated people get sick; others don’t.
  • Is the vaccine safe?

    • Some vaccinated people develop serious side effects; others don’t.

How do we deal with uncertainties?

  • We need data!

  • From the data, we can study the variability and identify patterns or trends in the data.

  • But we need to be careful!
  • How we collect the data affects how we analyze the data and the type of conclusions we can make.

This is where statistics comes in

  • Statistics is the science that studies variability.

  • It provides us with techniques to:

    1. design studies;
    2. collect, summarize, and analyze data;
    3. create and interpret models to draw conclusions;

Confirmation bias

  • Data are interpreted by people.

  • The strong convictions some people have may affect how they collect and interpret the data.

  • For example, people tend to focus on evidence that supports their beliefs and disregard other pieces of evidence.

  • This phenomenon is called confirmation bias.

Data subtleties

Statistics for all!

  • Understanding statistical concepts will enable you to assess and question people’s analyses and conclusions critically.

  • Do not just accept someone’s findings. Think!

    • What evidence did they present?
    • Is there any evidence they had missed (or buried 😈);
    • Do the data and their analysis actually allow them to reach such conclusions?

You are awesome!

  • You are very capable. THINK! Make your own conclusions!

  • Don’t feel intimidated by titles. Skepticism and detailed questioning are part of science!

Datasets and variables

Datasets

  • Statistics is all about using data to analyze the variability and uncertainties involved in a study.

  • Typically, you can think of a dataset as a table where:

    • every row corresponds to an individual/object.

    • every column corresponds to a variable.

Example: Palmer Penguins Dataset

Artwork by @allison_horst

Dr. Kristen Gorman has collected data on 344 penguins from three islands in the Palmer Archipelago, Antarctica.

Artwork by @allison_horst

Multiple variables were recorded for each penguin, such as: island, species, bill depth, bill length, body mass, sex, among others.

Example: Palmer Penguins Dataset

species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g sex year
Adelie Biscoe 45.6 20.3 191 4600 male 2009
Adelie Torgersen 35.9 16.6 190 3050 female 2008
Adelie Biscoe 36.5 16.6 181 2850 female 2008
Adelie Dream 35.7 18.0 202 3550 female 2008
Adelie Torgersen 35.2 15.9 186 3050 female 2009
Gentoo Biscoe 49.6 16.0 225 5700 male 2008
Adelie Torgersen 34.4 18.4 184 3325 female 2007
Adelie Dream 36.3 19.5 190 3800 male 2008
Adelie Torgersen 44.1 18.0 210 4000 male 2009
Chinstrap Dream 47.6 18.3 195 3850 female 2008
Chinstrap Dream 51.3 19.9 198 3700 male 2007
Adelie Biscoe 37.7 16.0 183 3075 female 2009
Gentoo Biscoe 44.5 14.7 214 4850 female 2009
Chinstrap Dream 43.5 18.1 202 3400 female 2009
Adelie Biscoe 38.2 18.1 185 3950 male 2007
Gentoo Biscoe 48.6 16.0 230 5800 male 2008
Gentoo Biscoe 49.1 14.8 220 5150 female 2008
Gentoo Biscoe 42.8 14.2 209 4700 female 2007
Gentoo Biscoe 46.2 14.9 221 5300 male 2008
Gentoo Biscoe 46.5 13.5 210 4550 female 2007
Chinstrap Dream 42.4 17.3 181 3600 female 2007
Gentoo Biscoe 44.9 13.3 213 5100 female 2008
Gentoo Biscoe 46.4 15.6 221 5000 male 2008
Gentoo Biscoe 49.2 15.2 221 6300 male 2007
Adelie Biscoe 39.6 17.7 186 3500 female 2008
Gentoo Biscoe 46.1 13.2 211 4500 female 2007
Gentoo Biscoe 59.6 17.0 230 6050 male 2007
Adelie Torgersen 35.1 19.4 193 4200 male 2008
Adelie Torgersen 34.6 17.2 189 3200 female 2008
Gentoo Biscoe 46.4 15.0 216 4700 female 2008

Variables

  • A variable is a characteristic of each individual (or object) of interest.

  • Variables can be classified as Categorical or Quantitative.

Categorical Variables

  • Categorical variables are variables whose values are categories (e.g., hair color, marital status);

  • If there is an intrinsic order for the categories, we say the variable is Ordinal.

    • Pain level: mild, moderate, severe;

    • Your rank in League of Legends: Iron, Silver, Gold, Diamond;

Quantitative Variables

  • A variable is quantitative if it is measured on a numerical scale (e.g., income, age, height).

  • Note that the units of measurement must be provided.

Caution

A variable is not necessarily quantitative just because its values are numbers. Sometimes numbers are used to represent categories.

Activity

species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g sex year
Adelie Torgersen 41.8 19.4 198 4450 male 2008
Gentoo Biscoe 45.1 14.4 210 4400 female 2008
Chinstrap Dream 46.6 17.8 193 3800 female 2007
Adelie Torgersen 42.9 17.6 196 4700 male 2008
Adelie Dream 36.5 18.0 182 3150 female 2007
Adelie Biscoe 39.7 17.7 193 3200 female 2009
Gentoo Biscoe 48.7 14.1 210 4450 female 2007
Chinstrap Dream 48.5 17.5 191 3400 male 2007
Adelie Torgersen NA NA NA NA NA 2007
Gentoo Biscoe 51.5 16.3 230 5500 male 2009
Adelie Biscoe 37.7 18.7 180 3600 male 2007
Gentoo Biscoe 48.4 16.3 220 5400 male 2008
Adelie Biscoe 35.0 17.9 192 3725 female 2009
Adelie Biscoe 40.6 18.6 183 3550 male 2007
Adelie Torgersen 34.6 17.2 189 3200 female 2008
Chinstrap Dream 52.2 18.8 197 3450 male 2009
Adelie Dream 39.6 18.8 190 4600 male 2007
Gentoo Biscoe 40.9 13.7 214 4650 female 2007
Gentoo Biscoe 46.7 15.3 219 5200 male 2007
Adelie Torgersen 35.2 15.9 186 3050 female 2009
Chinstrap Dream 51.3 19.9 198 3700 male 2007
Chinstrap Dream 40.9 16.6 187 3200 female 2008
Chinstrap Dream 45.4 18.7 188 3525 female 2007
Adelie Torgersen 41.4 18.5 202 3875 male 2009
Chinstrap Dream 42.4 17.3 181 3600 female 2007
Gentoo Biscoe 50.7 15.0 223 5550 male 2008
Chinstrap Dream 45.2 17.8 198 3950 female 2007
Adelie Torgersen 39.3 20.6 190 3650 male 2007
Gentoo Biscoe 49.1 14.8 220 5150 female 2008
Adelie Biscoe 41.4 18.6 191 3700 male 2008


  • Categorize each variable in the penguins data frame as categorical or quantitative.

References & Attributions

Image Attributions

References

Horst, Allison Marie, Alison Presmanes Hill, and Kristen B Gorman. 2020. Palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. https://doi.org/10.5281/zenodo.3960218.