Data Science and Statistics: Key Concepts and Tools for Analysis

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/125

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:55 PM on 9/22/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

126 Terms

1
New cards

Data science

Using statistics, programming, data, and real-world/disciplinary expertise—plus ethical reasoning and communication—to make good decisions with data (at scale, for organizations, in context).

2
New cards

Data

Not only numbers, not only facts, and not strictly objective truth—data are generated by humans and/or human systems and tools, so they carry human choices.

3
New cards

Data & identity

Data both produce identity and are shaped by it—e.g., targeted advertising based on demographics, medical data used in diagnosis and treatment.

4
New cards

Quantified self movement

People tracking data about themselves (steps, sleep, heart rate, etc.) to measure and understand their own lives.

5
New cards

Surveillance capitalism

Shoshana Zuboff's term: companies claim human experience as free raw material, translate it into behavioral data, and turn it into prediction products that are sold.

6
New cards

Behavioral surplus

In Zuboff's framing, the behavioral data beyond what is needed to improve a service; it is fed into machine intelligence to make prediction products.

7
New cards

Behavioral futures markets

Zuboff's term for the marketplace where prediction products about what people will do next are traded.

8
New cards

"Data is the new oil"

Clive Humby's metaphor: data, like crude oil, is valuable but must be refined (processed and analyzed) to be useful; treats data as a commodity.

9
New cards

Research (inference/explanation) question

Asks what is true and why. Goal: learn about the world and use evidence to support a defensible conclusion. Example: Does YouTube create echo chambers?

10
New cards

Prediction question

Asks what is likely to happen. Success = accurate predictions on new observations; less about why, more about how accurately. Example: predict the ideology of a YouTube video.

11
New cards

Good data scientist's three statements

"Here is what we found. Here is how strongly the evidence supports it. Here is what we cannot conclude."

12
New cards

Open science

Showing and sharing your work (data, code, methods) so others can check and build on it; promoted by the Center for Open Science.

13
New cards

Reinhart-Rogoff Excel error

"Growth in a Time of Debt" (Reinhart & Rogoff) was used to support austerity; grad student Thomas Herndon found spreadsheet errors (e.g., a bad AVERAGE range). Shows why transparent, reproducible code matters.

14
New cards

Florence Nightingale

Used careful data collection, analysis, and visualization (her rose/"coxcomb" diagram of causes of mortality in the Crimean War) to show most soldier deaths were from preventable disease.

15
New cards

Choropleth map

A map where predefined areas (countries, states, counties) are shaded or colored to show a value. Early example: Charles Dupin's 1826 map of France.

16
New cards

Isopleth map

A map that uses continuous lines (contours) connecting points of equal value, regardless of political boundaries.

17
New cards

Descriptive statistics

Summaries that describe data you have—e.g., measures of central tendency, dispersion, and variability; absolute and relative values.

18
New cards

Inferential statistics

Using data to draw conclusions or make predictions beyond the data, based on hypothesis testing—e.g., regression analyses.

19
New cards

Central tendency

The "center" or typical value of a set of data; main measures are the mean and the median.

20
New cards

Mean

The arithmetic average: add all values and divide by how many there are. Sensitive to extreme values (outliers). Example: mean(c(1, 2, 3)) # 2

21
New cards

Median

The middle value when data are sorted. Resistant to outliers—"Median to the rescue!" in the Bill Gates bar example. Example: median(x)

22
New cards

Outlier (Bill Gates in a bar)

An extreme value that distorts the mean. Ten $35k workers + one $1bn earner → mean ≈ $91 million, but the median is still $35k.

23
New cards

Dispersion / variability

How spread out the values in a data set are (e.g., range, standard deviation). Example: sd(x)

24
New cards

"Lies, damned lies, and statistics"

Phrase popularized by Mark Twain; a warning that numbers can be used to mislead, so we must understand what statistics mean (and don't).

25
New cards

Exploratory data analysis (EDA)

Investigating data to find patterns and questions—"EDA is a state of mind" (Wickham). Tools: visualization, transformation, modeling.

26
New cards

Variation

The tendency of values of a single variable to change from measurement to measurement. EDA question: what type of variation occurs within my variables?

27
New cards

Covariation

The tendency of the values of two or more variables to vary together in a related way. EDA question: what type of covariation occurs between my variables?

28
New cards

Correlation (positive / negative)

A relationship where two variables move together (positive) or in opposite directions (negative); can be linear or non-linear. Penguin question: body mass vs. flipper length.

29
New cards

R

An open-source programming language designed for statistical computing and data visualization; the engine that runs your code and performs calculations.

30
New cards

RStudio

The application (made by Posit) that provides a user-friendly interface to write, edit, and run R code. R = engine, RStudio = dashboard; you need both.

31
New cards

IDE (Integrated Development Environment)

Software that combines a programmer's tools in one place: code editor (syntax highlighting), debugger, compiler/interpreter, and autocomplete. RStudio is an IDE.

32
New cards

Posit

The company (formerly RStudio, PBC) that makes RStudio and supports open-source data science tools like the tidyverse.

33
New cards

CRAN

The Comprehensive R Archive Network—the official site to download R and R packages.

34
New cards

Source pane

RStudio pane (top-left) where you write and edit scripts / .Rmd files—your code editor.

35
New cards

Console

RStudio pane where R code actually runs; good for one-time commands like install.packages(). The Source pane is a notepad; the Console is the engine.

36
New cards

Environment pane

RStudio pane showing the objects (data, values, variables) currently stored in your session; also holds History.

37
New cards

Output pane (Files/Plots/Packages/Help/Viewer)

RStudio pane that shows plots, files, installed packages, and help pages.

38
New cards

Markdown

A lightweight markup language that adds formatting to plain text with symbols (e.g., # Heading, **bold**). Created by John Gruber (2004). Example: # Heading one; **this text is bold**

39
New cards

WYSIWYG

"What you see is what you get" editors (like Word) where formatting shows instantly—unlike Markdown, where you add syntax.

40
New cards

R Markdown (.Rmd)

A file type that combines text (explanations), code (analysis), and output (tables, plots) in one place; results update automatically and steps are recorded.

41
New cards

Code chunk

A block inside an .Rmd file where R code goes; starts with ```{r} and ends with ```. Run it with the green play arrow. Example: ```{r}; 2 + 2; ```

42
New cards

YAML header

Settings block at the top of an .Rmd file (between ---) with title, author, date, and output format. Example: title: "Homework 1"; output: html_document

43
New cards

Knitting

Rendering an .Rmd file into a finished document (HTML, PDF, Word) that includes your text, code, and output. Submit both the .Rmd and the PDF.

44
New cards

Working directory

The folder R reads files from and saves files to by default. Setting it correctly is part of good file storage hygiene. Example: setwd("~/DS1000"); getwd()

45
New cards

Good file storage hygiene

Organizing folders and file names clearly—"we are programming for people, not the computer."

46
New cards

Comment (#)

Text after # that R ignores; used to annotate/explain code so others (and future you) can read it. "Annotating your code is top-tier behavior." Example: # Access the first item; fruits[1]

47
New cards

Package

A bundle of pre-written R functions (plus data/documentation) that researchers share; must be installed before use. ggplot2 is a package.

48
New cards

Library

Where installed packages are stored on your computer; library() loads a package into your current session.

49
New cards

install.packages()

Downloads a package to your machine. Type in the Console, once. Example: install.packages("tidyverse")

50
New cards

library()

Loads an installed package so you can use its functions. Put it at the top of your script—every time. Example: library(tidyverse)

51
New cards

tidyverse

An opinionated collection of R packages for data science (ggplot2, dplyr, tidyr, readr, tibble, purrr, stringr, forcats) sharing a design philosophy and grammar.

52
New cards

Hadley Wickham

Chief Scientist at Posit who leads the tidyverse team; co-author of R for Data Science.

53
New cards

Base R

The functions that come with R by default, without extra packages; can look different from tidyverse code, which aims to make common operations simpler.

54
New cards

? (help)

Typing ? before a function or object name opens its help page. Example: ?mean

55
New cards

Keyboard shortcuts

Alt + - (Option + - on Mac) types the assignment operator

56
New cards

Object

A named container that stores a saved result (a value, vector, data frame, etc.). Think of a labeled box: the label is the name, the contents are the value. Example: x

57
New cards

Assignment operator (

Assigns the value on the right to the name on the left; read as "gets." Creates or updates an object. Example: age

58
New cards

Variable (in R code)

A named object that holds a value, e.g., age, city, is_active.

59
New cards

Naming conventions

Use descriptive names in lowercase with underscores; avoid spaces, special characters, or starting with a number (2nd, ^mean, _day cause errors). Example: total_sales # good

60
New cards

snake_case

Naming style using lowercase words joined by underscores (my_var, scores_plus5); recommended for R variable names.

61
New cards

Case-sensitive

R treats uppercase and lowercase as different: number and Number are two separate objects. Example: number

62
New cards

Arithmetic operators

+ addition, - subtraction, * multiplication, / division, ^ exponent, %% modulus (remainder), %/% integer division. Example: 17 %% 5 # 2; 17 %/% 5 # 3; 2^6 # 64

63
New cards

Modulus (%%)

Returns the remainder after division. Example: 10 %% 3 # 1

64
New cards

Integer division (%/%)

Divides and keeps only the whole-number part. Example: 10 %/% 3 # 3

65
New cards

Data types

Kinds of values: numeric (5, 2.5), character/string ("hello", in quotes), logical (TRUE/FALSE).

66
New cards

Character (string)

Text data; must be in quotation marks. Example: city

67
New cards

Logical value

TRUE or FALSE (all caps, no quotes). Example: is_active

68
New cards

Vector

The most fundamental data structure in R: an ordered collection of elements of the same data type. Example: my_vector

69
New cards

c()

The combine/concatenate function; glues values into a vector. Example: fruits

70
New cards

Vector indexing ([ ])

Access an item by its position in square brackets. R starts counting at 1. Example: fruits[1] # "banana"

71
New cards

Element-wise (vectorized) operation

One operation applied to every element of a vector at once. Example: scores

72
New cards

Sequence (: and seq())

Creates a sequence of numbers. Example: 1:5 # 1 2 3 4 5; seq(1, 10)

73
New cards

Function

A self-contained block of code that performs a specific task: takes inputs (arguments), processes them, and often returns output. Format: function_name(arguments).

74
New cards

Argument

The information passed to a function; goes inside the parentheses after the function name. Example: mean(x, na.rm = TRUE)

75
New cards

length()

Returns the number of elements in a vector. Example: length(c(1, 2, 3)) # 3

76
New cards

sum()

Adds together all numeric elements. Example: sum(c(10, 20, 30)) # 60

77
New cards

sqrt()

Computes the square root. Example: sqrt(16) # 4

78
New cards

print()

Displays an object's value. (Typing the object's name alone also inspects it.) Example: print(x)

79
New cards

NA

"Not available"—R's marker for a missing value.

80
New cards

NAs are contagious

Most math/stat functions (mean, sum, sd, median) return NA if even one value is missing. Example: mean(c(1, NA, 3)) # NA

81
New cards

na.rm = TRUE

Argument that removes missing values during a calculation (and documents how you handled them). Example: mean(c(1, NA, 3), na.rm = TRUE) # 2

82
New cards

Boolean expression

An expression that evaluates to either TRUE or FALSE. Example: 10 > 9 # TRUE

83
New cards

Relational (comparison) operators

== equal to, != not equal to, > greater than, < less than, >= greater than or equal to,

84
New cards

== vs =

== tests whether two values are equal (returns TRUE/FALSE); = (or

85
New cards

AND (&)

Returns TRUE only if both conditions are TRUE. Example: scores > 70 & scores < 95

86
New cards

OR (|)

Returns TRUE if at least one condition is TRUE. (Pipe key is above Enter.) Example: scores < 65 | scores > 95

87
New cards

NOT (!)

Negates (flips) a logical value. Example: !(scores >= 80)

88
New cards

Vector comparison

Comparing a vector to a value checks every element and returns a logical vector. Example: scores > 80; # FALSE TRUE TRUE FALSE TRUE

89
New cards

Data frame (df)

A table of data in rows and columns, built from vectors; columns can be different data types. Variables are columns, observations are rows. Example: students

90
New cards

Observation

A single row in a data frame (e.g., one penguin, one student).

91
New cards

Variable (in a data frame)

A single column in a data frame—one measured characteristic (e.g., flipper_length_mm).

92
New cards

Tibble

The tidyverse's modern data frame, with easier viewing and other improvements over original R data frames.

93
New cards

$ operator

Accesses/extracts one column (or other object) from a data frame. Example: students$hours

94
New cards

head()

Shows the first rows of a data frame. Example: head(students)

95
New cards

str()

Shows a data frame's structure: number of observations/variables and each column's data type. Example: str(students)

96
New cards

nrow() / ncol()

Return the number of rows / columns in a data frame. Example: nrow(students); ncol(students)

97
New cards

dplyr

The tidyverse package of "verbs" (functions) for manipulating data frames.

98
New cards

filter()

Picks observations (rows) by their values based on a condition. Example: students %>% filter(hours > 5)

99
New cards

arrange()

Reorders rows (sorts), ascending by default—like sorting in Excel. Example: students %>% arrange(hours)

100
New cards

desc() / arrange(-x)

Sorts in descending order inside arrange(). Example: students %>% arrange(desc(hours))