Week 4, Day 2

Lab 2

Revisions Due Tonight

Please make sure you submitted reflections with your revisions! If there are not revisions present when I start grading them tomorrow morning, your revisions are not eligible to be regraded.

Lab 3

A Grading Reminder


“Complete” = Satisfactory


Your group obtained a “Success” on every question

“Incomplete” = Growing


Your group received a “Growing” on at least one question

Common Mistakes

  • Categorical variables in R (Q2)
    • What data types does R use to store categorical variables? Integers? Characters? Doubles? Factors? Dates?
    • The output of glimpse() can help!
  • Comparing distributions between groups (Q9)
    • Were trout observed in every channel type in both sections of forest?
  • Calculating group means (Q10)
    • group_by()creates groups based on a categorical variable not based on the dataset
    • group_by(species) not group_by(trout)

Copying the Lab – Last Week’s Recorder

The person who typed your lab needs to make their project “public”

  1. Open Posit Cloud
  2. Go to the STAT 313 workspace
  3. Click on “Your Content”
  4. Open the settings for your Lab 3 project

Copying the Lab – Last Week’s Recorder

  1. Change the access for your project to “Space Members”

Copying the Lab – Everyone Else

  1. Find your group member’s lab (you can use the search bar to search for their name)

  1. Open their Lab 3 project
  2. Select “Save a Permanent Copy”

Completing Revisions

Lab 3 revisions are due by Wednesday, May 1.

  1. Read comments on Canvas
  2. Copy your group’s lab assignment
  3. Complete your revisions
  4. Render your revised Lab 3
  5. Download your revised HTML
  6. Submit your revisions to the original Lab 3 assignment portal

Reflections

Revisions are required to be accompanied with reflections on what you learned while completing your revisions. These can be written in your Lab 3 file (next to the problems you revised), in a Word document, or in the comment box on Canvas.

The History of Regression

Least Squares

Published in 1805 by Legendre

and Gauss in 1809

Used to determine, from astronomical observations, the orbits of bodies about the Sun.

“regression”

  • Coined by Francis Galton in the 19th century

  • Described a biological phenomenon

    • Heights of children of tall parents tend to be tall, but shorter than their parents
    • “regression to the mean”

A “polymath”

  • In Statistics, Galton (1822–1911) is a towering figure.

  • He invented standard deviation, correlation, linear regression, ANOVA

  • Galton’s developments and discoveries were fueled in large part by his fascination with the science of heredity.

The Invention of Eugenics

  • Based on Greek eugenes, meaning “well-born”

  • The science of heredity could help humanity better itself through breeding.

  • Galton served as founding president of the British Eugenics Society

“What nature does blindly, slowly and ruthlessly, man may do providently, quickly, and kindly. As it lies within his power, so it becomes his duty to work in that direction.”

Francis Galton

And then it spread…

  • Mein Kampf references the ideas of British and American eugenicists

  • Declared non-Aryan races inferior

  • Believed Germans should do everything possible to make sure their gene pool stayed “pure”

But wasn’t that a long time ago?

Between 1970 and 1976 between 25% and 50% of Native Americans were sterilized, many without consent

In 1927 the US Supreme Court ruled that sterilization of the handicapped did not violate the Constitution.


In 1957 “conservatorship” was introduced “to avoid the stigma of incompetency”

Would you be in this class?

Is your skin white?

Are you blonde?

Do you have blue eyes?

Were your ancestors poor?

Are you Muslim, Hindu, Buddhist, Sikh, Tao, or Jewish?

Do you identify as LGBTQIQ+?

More Information

Lab 4

Today’s Data

Data includes lake name, dates of freeze-up and thaw, and duration of ice cover of lakes in the Madison, WI area. Ice cover duration is the number of days that a lake is frozen, excluding periods where the lake thaws before refreezing again. Lakes Monona and Wingra are considered to be frozen if they are completely ice covered, while Lake Mendota is considered to be frozen if there is ice from Picnic Point to Maple Bluff and more than 50% of the lake is covered by ice.

Research Question



Has the duration of ice cover changed over the last 175 years?

Data Layout

lakeid ice_on ice_off ice_duration year
Lake Mendota 1880-11-23 1881-05-03 161 1880
Lake Mendota 1932-12-10 1933-04-04 115 1932
Lake Mendota 2003-01-04 2003-04-03 89 2002
Lake Mendota 1953-12-30 1954-03-25 85 1953
Lake Monona 1963-12-18 1964-03-19 92 1963
Lake Monona 1989-12-07 1990-03-15 98 1989
Lake Monona 1985-12-06 1986-03-29 113 1985
Lake Monona 1996-12-20 1997-03-26 96 1996

Recording the year of the winter

How is the year variable related to the ice_on and ice_off variables?