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 37.7 16.0 183 3075 female 2009
Adelie Torgersen 45.8 18.9 197 4150 male 2008
Adelie Dream 40.8 18.4 195 3900 male 2007
Gentoo Biscoe 49.1 15.0 228 5500 male 2009
Adelie Dream 41.1 19.0 182 3425 male 2007
Adelie Torgersen 38.6 21.2 191 3800 male 2007
Gentoo Biscoe 48.2 15.6 221 5100 male 2008
Chinstrap Dream 50.8 18.5 201 4450 male 2009
Gentoo Biscoe 50.7 15.0 223 5550 male 2008
Chinstrap Dream 52.2 18.8 197 3450 male 2009
Adelie Biscoe 37.7 18.7 180 3600 male 2007
Adelie Torgersen 41.8 19.4 198 4450 male 2008
Adelie Biscoe 37.8 20.0 190 4250 male 2009
Adelie Dream 35.6 17.5 191 3175 female 2009
Chinstrap Dream 58.0 17.8 181 3700 female 2007
Adelie Dream 36.3 19.5 190 3800 male 2008
Gentoo Biscoe 48.4 16.3 220 5400 male 2008
Gentoo Biscoe 48.4 14.6 213 5850 male 2007
Gentoo Biscoe 46.4 15.6 221 5000 male 2008
Adelie Dream 36.0 17.1 187 3700 female 2009
Gentoo Biscoe 46.2 14.4 214 4650 NA 2008
Chinstrap Dream 47.6 18.3 195 3850 female 2008
Gentoo Biscoe 49.0 16.1 216 5550 male 2007
Adelie Biscoe 35.7 16.9 185 3150 female 2008
Adelie Torgersen 37.3 20.5 199 3775 male 2009
Adelie Torgersen 41.4 18.5 202 3875 male 2009
Adelie Torgersen 37.7 19.8 198 3500 male 2009
Chinstrap Dream 50.7 19.7 203 4050 male 2009
Gentoo Biscoe 46.5 13.5 210 4550 female 2007
Adelie Dream 36.0 17.9 190 3450 female 2007

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.1 17.6 182 3200 female 2007
Chinstrap Dream 46.2 17.5 187 3650 female 2008
Gentoo Biscoe 50.0 16.3 230 5700 male 2007
Gentoo Biscoe 52.2 17.1 228 5400 male 2009
Chinstrap Dream 42.5 16.7 187 3350 female 2008
Adelie Biscoe 35.3 18.9 187 3800 female 2007
Adelie Dream 36.4 17.0 195 3325 female 2007
Gentoo Biscoe 49.6 16.0 225 5700 male 2008
Chinstrap Dream 45.2 17.8 198 3950 female 2007
Adelie Biscoe 36.4 17.1 184 2850 female 2008
Gentoo Biscoe 45.7 13.9 214 4400 female 2008
Gentoo Biscoe 43.8 13.9 208 4300 female 2008
Adelie Torgersen 34.6 17.2 189 3200 female 2008
Gentoo Biscoe 45.1 14.5 215 5000 female 2007
Chinstrap Dream 53.5 19.9 205 4500 male 2008
Gentoo Biscoe 48.2 15.6 221 5100 male 2008
Chinstrap Dream 46.6 17.8 193 3800 female 2007
Adelie Torgersen 36.2 17.2 187 3150 female 2009
Chinstrap Dream 50.1 17.9 190 3400 female 2009
Adelie Dream 37.0 16.9 185 3000 female 2007
Gentoo Biscoe 47.5 14.0 212 4875 female 2009
Gentoo Biscoe 46.2 14.1 217 4375 female 2009
Adelie Torgersen 36.7 18.8 187 3800 female 2008
Chinstrap Dream 49.0 19.5 210 3950 male 2008
Adelie Biscoe 40.1 18.9 188 4300 male 2008
Adelie Torgersen 42.8 18.5 195 4250 male 2008
Gentoo Biscoe 46.8 14.3 215 4850 female 2009
Gentoo Biscoe 49.4 15.8 216 4925 male 2009
Gentoo Biscoe 45.5 13.9 210 4200 female 2008
Adelie Biscoe 39.7 17.7 193 3200 female 2009


  • 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.