# Understanding the World with Data

STAT 20: Introduction to Probability and Statistics

## Agenda

• Introductions
• The Data Science Lifecycle
• Types of Claims with Practice
• Course Structure and Syllabus
• Intro to R and RStudio
• Looking forward

# Introductions

• Let us first introduce ourselves!

# Introductions

• In groups of 3, take turns introducing yourselves to one another by providing the info listed on the handout (your name, hometown, etc).

• Each person should finish with a handout filled-in with info on their groupmates. Make sure you save this for later this week!

05:00

# The Data Science Lifecycle

What’s going on here?

• As a group, formulate at least three possible explanations for what’s going on in the picture.
• Enter them at pollev.com or upvote existing explanations if they are very similar to your own.
05:00

Does this image change which claims are more or less likely?

Up and down vote explanations at pollev.com. /

Understand
the World

Data

Understand
the World

Data

## Takeaways from this exercise

We can call the process of:

• having a question,
• finding data to investigate that question,
• reaching a conclusion,
• and then thinking of a next step which starts everything over again
• the data science lifecycle.

This lifecycle involves constructing and critiquing claims made using data: which is the main goal of our course!

# Types of Claims

## Course Goal

To learn to critique and construct

To learn to critique and construct

To learn to critique and construct

To learn to critique and construct

To learn to critique and construct

To learn to critique and construct

To learn to critique and construct

A numerical, graphical, or verbal description of an aspect of data that is on hand.

Example
Using data from the Stat 20 class survey, the proportion of respondents to the survey who reported having no experience writing computer code is 70%.

A numerical, graphical, or verbal description of a broader set of units than those on which data was been recorded.

Example
Using data from the Stat 20 class survey, the proportion of Berkeley students who have no experience writing computer code is 70%.

A claim that changing the value of one variable will influence the value of another variable.

Example
Data from a randomized controlled experiment shows that taking a new antibiotic eliminates more than 99% of bacterial infections.

A guess about the value of an unknown variable, based on other known variables.

Example
Based on reading the news and the price of Uber’s stock today, I predict that Uber’s stock price will go up 1.2% tomorrow.

# Practice Concept Questions

## Practice Concept Questions

We will now re-examine a few pathways in the data science lifecycle:

• Forming a question -> collecting data
• Collecting data -> making a claim

Now, visit the PollEverywhere site provided by your instructor to answer the following questions.

## From Questions to Data

Is the incidence of COVID on campus going up or down?

Will this question be answered by a summary, a prediction, a generalization, or a causal claim?

Also discuss: what type of data can help answer this question? Consider:

• Which different people / institutions collect relevant data
• Is certain data not available? Why not?
06:00

## From Data to Claims

One source of data:

“The following dashboard provides information on COVID-19 testing performed at University Health Services or through the PCR Home Test Vending Machines on campus. It does not capture self-reported positive tests. It provides a look at new cases and trends, at a glance.”

Formulate one claim that is supported by this data1.

03:00

# Break

05:00

# Course Structure

• Work through concept questions solo / in groups / as a class
• Make progress on assignments

All of the materials and links for the course can be found at:

www.stat20.org

# Syllabus

Take 4 minutes to read through the syllabus and jot down at least one question that you have.

04:00

# Intro to R and RStudio

Visit stat20.datahub.berkeley.edu! We will now:

• Demo the four parts of RStudio
• Show you how to work with a Quarto Document
• Walk through the first few questions of Lab 0

## Components of RStudio

1. Console

2. Environment

3. Editor

4. File Directory

Now we are going to switch over to RStudio to understand these 4 components a bit better.

## Components of RStudio

1. Console: Where the live R session lives. Type commands into the prompt > and press enter/return to run them. The Console is in the lower-left pane.

2. Environment: The space that keeps track of all of the data and objects that you have created or loaded and have access to. Found in the upper right pane.

3. Editor: Used to compose and edit text (.qmd files) and R code (.r files). Found in the upper left pane.

4. File Directory: Used to navigate between your files/folders on your Rstudio account. Can move, copy, rename, delete, etc. Found in the lower right pane.

## R as a calculator

R allows all of the standard arithmetic operations.

1 + 2
[1] 3

Subtraction

1 - 2
[1] -1

Multiplication

1 * 2 
[1] 2

Division

1 / 2
[1] 0.5

## R as a calculator, cont.

R allows all of the standard arithmetic operations.

Exponents

2 ^ 3
[1] 8

Parentheses for Order of Ops.

2 ^ 3 + 1
[1] 9
2 ^ (3 + 1)
[1] 16

01:00