ENGRD 2700 - Prelim 1

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

1/232

encourage image

There's no tags or description

Looks like no tags are added yet.

233 Terms

1
New cards

What is Probability & Statistics?

Its the study of models and data to help you understand a system better/ make decisions better.

2
New cards

Probability

Builds random models of phenomena

3
New cards

A phenomena is a random outcome if

its outcome can’t be predicted in advance:

  • flipping a coin

  • tomorrow’s stock price

  • the result of an upcoming election


4
New cards

Statistics

(1) organizing & summarizing data and (2) using the data to draw conclusions, e.g.

  • based on the outcomes of some tosses, is the coin fair?

  • based on the stock’s price in the past, will it go up tomorrow

  • based on survey data, who will win the election?


5
New cards

Population

a well-defined set of items you’re interested

6
New cards

Sample

a well-defined subset of a population (often use to study that population)

7
New cards

Observation

an individual measurement from a sample

8
New cards

What are some examples of population vs sample?

  • All students taking ENGRD 2700 (population), vs. all

    sophomores taking ENGRD 2700 (sample)

  • All U.S. universities (population), vs. all Ivy League

    universities (sample)

  • All voters in the U.S. (population), vs. all college-educated

    voters (sample)


9
New cards

Simple random sample of size n

Each subset of size n of the population is equally likely to be chosen

10
New cards

Stratified random sample

Collect random samples from sub-populations of the population

  • e.g. sample 700 Cornell undergrads by sampling 100 undergrads from each college


11
New cards

Real-valued data

Numerical measurements that are expressed as real numbers (they can be both whole integers and fractions or decimals)

  • e.g. pollution concentration


12
New cards

Integer-valued data

Numerical measurements that are expressed as only integers

  • e.g. defect counts


13
New cards

Categorical data

Data that is defined as categories

  • e.g. makes of cars


14
New cards

What is Exploratory Data Analysis (EDA)

Summarize main characteristics of the data (via plots, summary statistics such as mean, median, variance).

15
New cards

What can EDA be used for?

To get a better (qualitative) understanding of the data, and to formulate questions about the data.

16
New cards

Formal Inference

Draw scientific inferences about the population from the data (formally test hypothesis)

  • Clinical trials

  • The hypothesis might come from EDA


17
New cards

How do you read stem & leaf plots?

stems from leading digits, and leaves from trailing digit

  • advantage: gives a sense of the distribution of the data values at a glance

  • disadvantage: only useful for small datasets


18
New cards

Why are scatter plots useful?

They are useful for understanding relationships between two variables

19
New cards

What is a warning for scatter plots?

Correlation does not imply causation!

20
New cards

Time Series Plots

Given data x1, . . . , xT for times 1,…,T, its time series plot is the plot of the points (1, x1),…,(T, xT)

21
New cards

Dotplots

Draw a number line and place a dot for each data point, stacking if they’re repeats. They are used sometimes for small data sets.

  • example: birth years of 160 individuals


22
New cards

Bar Charts

Bar Charts are used for qualitative data. Some examples are:

  • Clicker responses

  • Numbers of people who use R, Python, Haskell, Scala, Java

  • What Trump supporters like about him


23
New cards

Histograms

Histograms are used for quantitative data.

24
New cards

What is the procedure for drawing out histograms?

  1. Find the smallest x1 and largest xn value that the data takes

  2. Partition the interval [x1, xn] into disjoint intervals

  3. For each interval Ij, find the # of data points nj that fall into Ij

  4. For each interval Ij, compute the relative frequency (fj = nj/n where nj is the count of data values in a specific bin and n is the total # in dataset)

  5. For each interval Ij, draw a rectangle centered at Ij ‘s midpoint whose area is proportional fj


25
New cards

What are the two properties of relative frequencies?

  • 0 ≤ fj ≤ 1

  • f1 + f2 + … + fk-1 + fk = 1


26
New cards

Suppose the width of each bin is 1: If the height of each rectangle is relative frequency, wha't’s the total area of the histogram’s rectangles

1

27
New cards

Suppose the width of each bin is 1: If the height of each rectangle is frequency, what’s the total area of the histogram’s rectangles?

n = number of data points

28
New cards

What are measures of location?

Measures of location are measures that indicate where the data tends to be situated.

29
New cards

Sample Mean

The average of the observations, or the center of mass (physical interpretation).

30
New cards

What are the two caveats of sample mean?

  • it doesn’t say much about how the data is distributed

  • It’s sensitive to extreme values


31
New cards

Sample Median

A measure of location that’s less sensitive to extremes than the sample mean (its more robust)

  • about ½ of the observations are above the sample median, and 1/3 are below it


32
New cards

Sample Mode

The measure that is the most frequently occurring value(s) in a sample (might not be unique)

33
New cards

Negative / Left skew

There is more data on the right

34
New cards

Positive / Right Skew

There is more data on the left

35
New cards

What are measures of variability?

they are measures that inidicate how spread out the data is

36
New cards

Sample Range

Largest observation - smallest observation

37
New cards

Sample Range Caveats

  • Crude measure of spread (only uses extremes)

  • Often increases without bound as the sample size n grows - not that useful as a general measure of variability


38
New cards

Sample Variance (σ2)

Draw it out

<p>Draw it out</p>
39
New cards

Sample standard deviation (σ)

square root of standard variance

40
New cards

Scaling property of SV

if you scale the dataset by a number c, the variance is multiplied by c2

41
New cards

Scaling property of SD

if you scale the dataset by a number c, the standard deviation is multiplied by |c|

42
New cards

q-quantile

A q-quantile of the data x1,…,xn is the smallest number greater than or equal to 100q percent of the values in the data

Example: For the salary data {45, 51, 54, 57, 58, 58, 75}

The 0.5 quantile - the 50th percentile is 57

43
New cards

p-percentile

A p-percentile is the smallest # that’s greater than or equal to p percent of the values in the data (i.e. p-percentile = (p/100) - quantile)

Example: For the salary data {45, 51, 54, 57, 58, 58, 75}

The 0.5 quantile - the 50th percentile is 57

44
New cards

For the smallest value of x(i) of the data, let

qi = (i - 0.5) / no

45
New cards

The q-quantile is defined as follows:

  • If there’s an i where q = qi, then the q-quantile is x(i)

  • If q is between qi and qi+1 the q-quantile is ((x(i) + x(i+1) ) /2)

  • If q ≤ q1 the q-quantile is x(1)


<ul><li><p>If there’s an i where q = q<sub>i</sub>, then the q-quantile is x<sub>(i)</sub></p></li><li><p>If q is between q<sub>i</sub> and q<sub>i+1 </sub>the q-quantile is ((x<sub>(i)</sub> + x<sub>(i+1) </sub>) /2)</p></li><li><p>If q ≤ q<sub>1 </sub>the q-quantile is x<sub>(1)</sub></p></li></ul><p></p>
46
New cards

Interquartile Range (IQR)

IQR = (0.75-quantile) - (0.25-quantile)

  • Much less sensitive to extreme values than the range and SV & SD


47
New cards

What is a probability?

It is a number between 0 and 1 that measurs how likely it is that something (an event) will occur

48
New cards

Event

a collection of outcomes you’re interested in, or subsets of the sample space

49
New cards

When all outcomes are equally likely, what is the probability that a given event occurs?

P (Event) = # of outcomes belonging to the event / # of possible outcomes


Example:

  • a fair coin, P(getting heads) = ½

  • a fair die, P(rolling 1) = 1/6


<p>P (Event) = # of outcomes belonging to the event / # of possible outcomes</p><p></p><p>Example:</p><ul><li><p>a fair coin, P(getting heads) = ½</p></li><li><p>a fair die, P(rolling 1) = 1/6</p></li></ul><p></p>
50
New cards

Multiplication Rule

If you have K types of things, and for type i = 1, 2 . . . ,K there’re Ni items, then there’re N1 × N2 · · · × Nk ways to select one item of each type

51
New cards

You’re packing for a trip, and have 5 different shirts. How many ways can you select shirts to pack? (You might pack none, or all 5 shirts.)

Number of ways = Number of subsets of shirts = 25

52
New cards

What’s the probability that a randomly-generated plate contains four repeating digits (e.g., RWX-3333)?

(263 × 10)/(263 × 104 )

53
New cards

If you draw a sample of size k with replacement from a set of n distinct items, how many ordered samples are possible?

nk

54
New cards

Ordered sampling without replacement

ordered sampling of k items without replacement from a set of n distinct items = a permutation (a re-ordering) of a list of k out of n possible items.


Pk, n = n! / (n-k)!

55
New cards

What matters for permutations?

Order

56
New cards

Combinations

the # of ways to select a set of k items from a set of n distinct items (th # of unordered samples without replacement) is:

Ck,n = n! / k!(n − k)! (n choose k)

57
New cards

What is the probability of getting a royal flush? (# of ways to get 10, J, Q, J, A of the same suit)

4 / (52 choose 5) = 0.0000015

58
New cards

what are two useful identities of combinations?

  • (n choose k) = (n choose n-k)

  • (n choose k) = (n-1 choose k-1) + (n-1 choose k)


<ul><li><p>(n choose k) = (n choose n-k)</p></li><li><p>(n choose k) = (n-1 choose k-1) + (n-1 choose k)</p></li></ul><p></p>
59
New cards

Hypergeometric Probabilties

Suppose we take a sample, without replacement, of size k from a population containing N1 Type 1 members and N2 Type 2 members. Then for k1 = 1, 2, …, min {k, N1},

P(get k1 Type 1 members) = ((N1 choose k1) (N2 choose k-k1)) / (N1 + N2 choose k)

<p>Suppose we take a sample, without replacement, of size k from a population containing N<sub>1</sub> Type 1 members and N<sub>2 </sub>Type 2 members. Then for k<sub>1</sub> = 1, 2, …, min {k, N<sub>1</sub>},</p><p>P(get k<sub>1</sub> Type 1 members) = ((N<sub>1</sub> choose k<sub>1</sub>) (N<sub>2</sub> choose k-k<sub>1</sub>)) / (N<sub>1</sub> + N<sub>2</sub> choose k)</p>
60
New cards

Hypergeometric distribution

Given N1, N2, and k, the probabilities that this assigns to the numbers k1 is called the hypergeometric distribution

61
New cards

With replacement, and order matters:

nk

62
New cards

Without replacement, and order matters:

Pk, n

63
New cards

Without replacement, and order doesn’t matter:

Ck,n = (n choose k)

64
New cards

What are the 3 elements that probability models are defined by?

  1. sample space: contains all the possible outcomes

  2. set of events: subsets of sample space

  3. probability function P: assigns probabilities (numbers between 0 and 1) to events

Example: flipping a fair coin

  1. sample space = {heads, tails}

  2. events = {∅, {heads}, {tails}, S}

  3. probability function P:

  • P(∅) = 0

  • P({heads}) = 0.5

  • P({tails}) = 0.5

  • P(S) = 1


65
New cards

A and B occur

A ∩ B = set of all outcomes that are in both A and B

66
New cards

A or B occurs

A ∪ B = set of all outcomes that are in A or B

67
New cards

A doesn’t occur

Ac = set of all outcomes that are not in A

68
New cards

set of all outcomes in A1 and A2 and…

draw it out

<p>draw it out</p>
69
New cards

set of all outcomes in A1 or A2 or…

draw it out

<p>draw it out</p>
70
New cards

De morgan’s law

For a sequence of A1, A2 … of events: draw in terms of set notation as well

  • — (A and B) = — A or — B

  • — (A or B) = — A and — B


<p>For a sequence of A<sub>1</sub>, A<sub>2</sub> … of events: draw in terms of set notation as well</p><ul><li><p>— (A and B) = — A or — B</p></li><li><p>— (A or B) = — A and — B</p></li></ul><p></p>
71
New cards

Probability Function

a function P(-) which assigns a number betwen 0 and 1 to every event, that satisfies the axioms of probability.

72
New cards

What are the axioms of probability?

  1. P(A) ≥ 0 for every event A.

  2. If the events A1, A2, . . . are mutually exclusive then, all of the probabilities together are added up (draw this out)

  1. P(S) = 1


<ol><li><p>P(A) ≥ 0 for every event A.</p></li><li><p>If the events A<sub>1</sub>, A<sub>2</sub>, . . . are mutually exclusive then, all of the probabilities together are added up (draw this out)</p></li></ol><ol start="3"><li><p>P(S) = 1</p></li></ol><p></p>
73
New cards

what is always the probability of the empty set?

P(∅) = 0

74
New cards

For finitely many mutually exclusive events A1, . . . , An,

P(A1 ∪ · · · ∪ An) = P(A1) + · · · + P(An)

75
New cards

For any event A,

  • P(A) ≤ 1

  • P(Ac ) = 1 − P(A)


76
New cards

For any two events A and B

P(A) ≤ P(B) if A is a subset of B

77
New cards

What is the inclusion-exclusion formula?

P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

78
New cards

what makes a sample space discrete?

when it is finite or countably infinite

79
New cards

In a discrete sample space, what are the two conditions the numbers p_s must satisfy to define a valid probability function?

  1. p_s ≥ 0 for every outcome s

  2. the sum of all ps over s in S equals 1 - total probability is 100%


<ol><li><p> p_s ≥ 0 for every outcome s</p></li><li><p>the sum of all p<sub>s </sub>over s in S equals 1 - total probability is 100%</p></li></ol><p></p>
80
New cards

Once each outcome has a probability ps, how is the probability of an event A defined?

P(A) = Σ ps summed over all outcomes s in A - add up the probabilities of the outcomes inside A for each event

<p>P(A) = Σ p<sub>s</sub> summed over all outcomes s in A - add up the probabilities of the outcomes inside A for each event</p>
81
New cards

When the sample space is the set of all real numbers, what density functions f(x). do we consider?

  1. f (x) ≥ 0 for all x ∈ R,

  2. ∫ f(x) dx = 1 with bounds [−∞, ∞] (total area under the curve should be one)


82
New cards

How is P([a,b]) defined for a continuous RV with density f(x)?

P([a, b]) = ∫ f(x) dx with upper bound = b, lower bound = a

83
New cards

Conditional Probability

Let A and B be events, and suppose P(B) > 0. The conditional probability that A occurs, given that B occurs is P(A|B) = P(A ∩ B) / P(B)

<p>Let A and B be events, and suppose P(B) &gt; 0. The <strong>conditional probability </strong>that A occurs, given that B occurs is P(A|B) = P(A ∩ B) / P(B)</p>
84
New cards

Multiplication rule for conditional probabilities

P(A ∩ B) = P(A)*P(B|A) = P(B)*P(A|B)

85
New cards

Multiplication rule for conditional probabilities extended:

P(A ∩ B ∩ C) = P(A)*P(B|A)*P(C|A ∩ B)

86
New cards

The events A1,…, An form a partition of the sample space S if:

  1. they’re mutually exclusive (i.e., Ai ∩ Aj = ∅ for all i, j);

  2. All of the events combined make up the sample space (draw out the set notation)


<ol><li><p>they’re mutually exclusive (i.e., Ai ∩ Aj = ∅ for all i, j);</p></li><li><p>All of the events combined make up the sample space (draw out the set notation)</p></li></ol><p></p>
87
New cards

Law of Total Probability

If B is an event, and A1, . . . , An is a partition of S, then P(B) = ∑n i=1 P(B ∩ Ai) = ∑n i=1 P(B|Ai)P(Ai).

88
New cards

Bayes’ Rule

Let A1, . . . , An be a partition of S, and let B be an event where P(B) > 0. If P(Aj) > 0 for all j, then:

P(Ai |B) = P(Ai ∩ B) / P(B) = P(B|Ai)P(Ai) / ∑ni=1 P(B|Aj)P(Aj)

Draw it out!

<p>Let A<sub>1,</sub> . . . , A<sub>n</sub> be a partition of S, and let B be an event where P(B) &gt; 0. If P(A<sub>j</sub>) &gt; 0 for all j, then:</p><p>P(A<sub>i</sub> |B) = P(A<sub>i</sub> ∩ B) /  P(B) = P(B|A<sub>i</sub>)P(A<sub>i</sub>) / ∑<sup>n</sup><sub>i=1 </sub>P(B|A<sub>j</sub>)P(A<sub>j</sub>)<sub> </sub></p><p>Draw it out!</p>
89
New cards

What is Bayes’ Rule useful for?

updating probabilities based on new information

90
New cards

Events A and B are independent if:

P(A ∩ B) = P(A) P(B)

91
New cards

What is P(A|B) equal to if A and B are independent and P(B) > 0?

P(A ∩ B) / P(B) = P(A)P(B) / P(B) = P(A)

<p>P(A ∩ B) / P(B) = P(A)P(B) / P(B) = P(A)</p>
92
New cards

What is P(A|B) equal to if A and B are independent and P(A) > 0?

P(B ∩ A) / P(A) = P(A)P(B) / P(A) = P(B)

93
New cards

If A and B are mutually exclusive, must they be independent?

No, say A ∩ B = ∅, P(A) > 0, P(B) > 0. Then P(B|A) = P(A ∩ B) / P(A) = 0

0 is not equal to P(B).

94
New cards

If A and B are independent, must they be mutually exclusive?

No, toss 2 fair coins, Ai = {ith coin is heads}. Then A1 and A2 are independent, but A1 ∩ A2 are not equal to ∅

95
New cards

The events A1,…An are independent if:

for every subset J of {1,…,n} they are independent too.

<p>for every subset J of {1,…,n} they are independent too.</p>
96
New cards

For A1, A2, A3 to be independent, we need:

P(A1 ∩ A2 ∩ A3) = P(A1)P(A2)P(A3)

P(A1 ∩ A2) = P(A1)P(A2)

P(A1 ∩ A3) = P(A1)P(A3)

P(A2 ∩ A3) = P(A2)P(A3)

97
New cards

Random Variable (Engineer)

A number whose value is unknown

98
New cards

Random Variable (Mathmetician)

A random variable is a function from the sample space S to R (real numbers)

99
New cards

How are random variables denoted?

upper-case letters (e.g., X)

100
New cards

How are particular values that random variables can take denoted?

lower-case letters (e.g., x)