Bayes’ Theorem
The Binomial Distribution
For example, we have a weighted coin with P(heads) = 0.6. Let x = the number of heads in 10 trials
→ Bin(10, 0.6) Example: There are three coins in a box: one fair coin, one two-headed coin, and one biased [Empirical Rule] coin with P(heads) = 2/3. If you draw one coin – Approximately 68% of the measurements will at random and flip it, what is the probability fall within 1 standard deviation of the mean. that it lands on heads? – Approximately 95% of the measurements will fall within 2 standard deviations of the mean. Example: There are three coins in a box: one – Approximately 99.7% of the measurements fair coin, one two-headed coin, and one biased will fall within 3 standard deviations of the coin with P(heads) = 2/3. You draw one coin at mean random and flip it: it lands on heads. What is [Probability] P(~A) = 1 – P(A) P(AUB)=P(A)+P(B)–P(A∩B) P(A∩ ~A) = 0, P(AU ~A) = 1 ***Mutually exclusive: P(A ∩ B) = 0 →P(A U B) = P(A) + P(B) [Conditional Probability] P(A | B) = P(A ∩ B) / P(B) P(A ∩ B) = P(A | B) P(B) = P(B | A) P(A)
the probability that it is the fair coin? Discrete random variables The Normal Distribution (Pr = 면적) → N(µ, σ),
An insurance company sells hurricane damage insurance to a Florida homeowner for $1,000/year. In a given year, there is a 95% chance of no damage, 4% chance of minor ($20,000) damage, and a 1% chance of major ($80,000) damage.
When A-B mutually exclusive and exhaustive P(A) = P(A ∩ B1) + P(A ∩ B2) + .. + P(A ∩ Bn) – Let x = the insurance company’s company’s profit. What is p(x)? = P(A | B1) P(B1) + P(A | B2) P(B2) + .. + P(A | Bn) P(Bn) p(1,000) = 0.95, p(-19,000) = 0.04, p(-79,000) = 0.01. ***Independent P(A|B) = P(A|~B) = P(A), P(B|A) = P(B|~A) = P(B) P(A ∩ B) = P(A | B) P(B) = P(A) P(B) P(A1∩...∩An) = P(A1) P(A2) ... P(An)
The Uniform Distribution (Pr = Area)
– What is the probability that the insurance company will make a profit in a given year? P(x > 0) = 95%. – What is the company’s expected yearly profit? Is this a profitable policy for the insurance company? 0.95($1,000) + 0.04(-$19,000) + 0.01(-$79,000) = -$600 Not profitable!
EX>inverse Large employers regularly use skill tests to evaluate potential employees. Suppose a test of programming proficiency has a mean score of 60% and standard deviation of 10%. If the employer only wants to hire the most proficient 20% of applicants, what is the minimum test score they should set? 1st step: Compute the necessary range of z-scores P(z > z0) = 0.2, P(0 < z < z0) = 0.5 0.5 – 0.2 = 0.3 z0 = F-1(0.3) ≈ 0.84 2nd step: Compute the necessary range of values z > 0.84 x > 60% + 0.84(10%)....x > 68.4% What if the employer wants to avoid hiring the bottom 20% of applicants?
HT
CI
Normal(μ0, s/√N) 2 Sided, 1 Sided (point : zc - 1.95, 1.645) Reject H0 if z<-zc or z>zc
large sample
c = 2*F(zc), zc = F-1(c / 2) t-dist(μ0, s/√N, N – 1 dof) small sample
(df = N – 1) → t-Table lookup
2 Sided, 1 Sided (point : tc - 2.131, 1.753, DoF=15) Reject H0 if t<-tc or t>tc Significance level α = 1 – 2*F(z c) for a 2-sided test Significance level α = 0.5 – F(z c) for a 1-sided test
t /2 with N – 1 degrees of freedom for a 2-sided test t with N – 1 degrees of freedom for a 1-sided test α
props - large sample (props small sample X - not covered)
α
Normal(p0, √p0(1 – p0) / N)
Assumption Above
p-value
For these inferences to be valid, we must make the same assumptions a parts a and b (constant μ, independent and identically distributed samples) and [additionally assume that daily sales are approximately normally distributed.] - small
CI
HT
H1 : μ1 ≠ μ2 , H0 : μ1 = μ2 2 means large sample *Using observed s to estimate σ!!!!
H1 : μ1 ≠ μ2 , H0 : μ1 = μ2 pooled sample variances:
pooled sample variances: DoF : n1 + n2 - 2
DoF : n1 + n2 - 2
2 means small sample
DoF : n1 + n2 - 2
2 props large sample (2 props small sample X - not covered)
Assumption Above
p0=p1=p2
For these inferences to be valid, we must make the same assump- tions as parts a and b (constant μ, independent and identically distributed samples) and [additionally assume that daily sales are approximately normally distributed.] - small
Paired Difference and go to previous page. lolz
The significance level α is the probability of incorrectly rejecting the null hypothesis H0, if the null is true.
Type I Error : α, Type II Error : β
Increasing the width of the interval decreases
α but increases β.
Balancing Type I and Type II errors Step 1: List and quantify the costs of a type I error. Step 2: List and quantify the costs of a type II error. Step 3: Estimate the distance of the true mean µ from µ0. (How large of an effect do we expect to see?) Step 4: Ask an expert to calculate the tradeoff between α and β. Step 5: Choose a value of α that reasonably balances these costs. EX> A computer supplies retail chain has a policy of only opening stores in communities where households spend more than $40 per year on computing supplies and equipment. A survey of 100 households in Monroeville finds that average expenditures in the sample are $40.50 with a standard deviation of $10. Is this strong evidence that the community spends more than $40? Option I: We will open stores in 80% of communities that spend $50 or more ( β = 0.2 for µ = 50) but also in 10% of communities that spend $40 or less ( α = 0.1). Option II: We will open stores in 50% of communities that spend $50 or more (β = 0.5 for µ = 50) but also in 5% of communities that spend $40 or less ( α = 0.05). Not happy with any of these options? Then collect more samples!