π(π΅) = π(π΅ ∩ π΄) + π(π΅ ∩ π΄′ ) = π(π΅|π΄)π(π΄) + π(π΅|π΄′ )π(π΄′) π(π΄ ∩ π΅) = π(π΅|π΄)π(π΄) = π(π΄|π΅)π(π΅) π(π΄ ∪ π΅) = π(π΄) + π(π΅) − π(π΄ ∩ π΅) ≤ 1 πΈ1 ∩ πΈ2 = πΈ1 ∩ πΈ1′ = 0 – Mutually exclusive πΈ(πΜ) − π = 0 – Unbiased π(π) = πΈ(π 2 ) − (πΈ(π))2 Two events are independent if: (1) π(π΄|π΅) = π(π΄) (2) π(π΅|π΄) = π(π΅) (3) π(π΄ ∩ π΅) = π(π΄)π(π΅) Probability density function: (1) π(π₯) ≥ 0 ∞ (2) ∫−∞ π(π₯)ππ₯ = 1 Joint probability mass function: (1) πππ (π₯, π¦) ≥ 0 (2) ∑π₯ ∑π¦ πππ (π₯, π¦) = 1 (3) πππ (π₯, π¦) = π(π = π₯, π = π¦) πΈ(ππ ) = πππ , π(ππ ) = πππ = (1 − ππ ) Marginal probability mass function: ππ (π₯) = π(π = π₯) = ∑ πππ (π₯, π¦) π¦ ππ (π¦) = π(π = π¦) = ∑ πππ (π₯, π¦) π₯ (3) π(π ≤ π ≤ π) = ∫π π(π₯)ππ₯ Probability mass function: (1) π(π₯π ) ≥ 0 (2) ∑ππ=1 π(π₯π ) = 1 (3) π(π₯π ) = π(π = π₯π ) Mean and variance of the discrete rv: Conditional probability mass function of Y given X=x is: πππ (π₯, π¦) ππ|π₯ (π¦) = , πππ ππ (π₯) > 0 ππ (π₯) Because a conditional probability mass function ππ|π₯ (π¦) is a probability mass function, the following prop. are satisfied: (1) ππ|π₯ ( π¦) ≥ 0 (2) ∑π¦ ππ|π₯ (π¦) = 1 (3) π(π = π¦|π = π₯) = ππ|π₯ (π¦) Conditional mean, variance: π = πΈ(π) = ∑ π₯π(π₯) = ∫ π₯π(π₯)ππ₯ ππ|π₯ = πΈ(π|π₯) = ∑ π¦ππ|π₯ (π¦) π ∞ π₯ −∞ ∞ π 2 = π(π) = ∑ π₯ 2 π(π₯) − π 2 = ∫ π₯ 2 π(π₯)ππ₯ − π 2 π₯ −∞ Discrete uniform distribution, all n has equal probability: 1 π+π (π − π + 1)2 − 1 π(π₯π ) = , πΈ(π) = , π(π) = π 2 12 Continuous uniform distribution: 1 (π + π) (π − π)2 π(π₯) = , πΈ(π) = , π(π) = (π − π) 2 12 A Bernoulli trial (Binomial distribution, success or failure) π π₯ π(π₯) = ( ) π (1 − π)π−π₯ (ππππ πππ ππ > 5 πππ π(1 − π) > 5) π₯ πΈ(π) = ππ, π(π₯) = ππ(1 − π) Geometric distribution: π(π₯) = (1 − π)π₯−1 π, π₯ = 1,2, … 1 2 π = πΈ(π) = , π = π(π₯) = (1 − π)/π2 π Negative binomial distribution nr of trials until r successes: π₯−1 ) (1 − π)π₯−π ππ , π = 1, 2, … , π₯ = π, π + 1, π + 2, … π(π₯) = ( π−1 π = πΈ(π) = π/π, π 2 = π(π) = π(1 − π)/π2 Hypergeometric distribution: N objects contains K objects = successes, N-K objects = failures. A sample of size n, X = # of successes in the sample. p=K/N, (good for n/N < 0.1) (πΎ)(π−πΎ) π(π₯) = π₯ ππ−π₯ , π₯ = max{0, π + πΎ − π} π‘π min{πΎ, π} (π ) π−π ) π = πΈ(π) = ππ, π 2 = π(π) = ππ(1 − π) ( π−1 Poisson distribution: π −π ππ₯ π(π₯) = , π₯ = 0, 1, 2, … (ππππ πππ π > 5) π₯! π = πΈ(π) = π(π) = π Cumulative distribution function: π₯ πΉ(π₯) = π(π ≤ π₯) = ∫ π(π’)ππ’, πππ − ∞ < π₯ < ∞ −∞ Expected value of a function of a continuous random value: ∞ πΈ[β(π₯)] = ∫ β(π₯)π(π₯)ππ₯ −∞ Normal distribution: −(π₯−π)2 1 π(π₯) = π 2π2 , π(π, π 2 ) √2ππ Standardizing to calculate a probability: π−π π₯−π ) = π(π ≤ π§) π(π ≤ π₯) = π ( ≤ π π Normal approximation to the binomial distribution: π − ππ π= √ππ(1 − π) is approximately a standard normal rv. To approximate a binomial probability with normal distribution π₯ + 0.5 − ππ ) π(π ≤ π₯) = π(π ≤ π₯ + 0.5) ≅ π (π ≤ √ππ(1 − π) and π₯ − 0.5 − ππ π(π ≤ π₯) = π(π₯ − 0.5 ≤ π) ≅ π ( ≤ π) √ππ(1 − π) The approximation is good for ππ > 5 and π(1 − π) > 5 Normal approximation to the Poisson distribution: π−π π= , π>5 √π Exponential distribution: π(π₯) = λe−λx , for 0 ≤ x ≤ ∞ π = πΈ(π) = 1/π, π 2 = π(π) = 1/π2 π¦ 2 2 ππ|π₯ = π(π|π₯) = ∑ π¦ 2 ππ|π₯ (π¦) − ππ|π₯ π¦ For discrete random variable X & Y, if one of the following is true, the other are also true and X, Y are independent: (1) πππ (π₯, π¦) = ππ (π₯)ππ (π¦), πππ πππ π₯ & π¦ (2) ππ|π₯ (π¦) = ππ (π¦), πππ πππ π₯ & π¦ π€ππ‘β ππ (π₯) > 0 (3) ππ|π¦ (π₯) = ππ (π₯), πππ πππ π₯ & π¦ π€ππ‘β ππ (π¦) > 0 (4) π(π ∈ π΄, π ∈ π΅) = π(π ∈ π΄)π(π ∈ π΅) Covarience: ∑ π₯π πππ£(π, π) = πππ = πΈ[(π − ππ )(π − ππ )] = πΈ(ππ) − ππ ππ , ππ = π Correlation: πππ£(π, π) πππ πππ = = , −1 ≤ πππ ≤ 1 √π(π)π(π) ππ ππ If X & Y are independent random variables, πππ = πππ = 0 (β) π! Combinations: (ππ) = π!(π−π)! π! Permutations: πππ = (π−π)! Μ is its standard deviation, given by: The standard error of an estimator Θ Μ) πΘΜ = √π(Θ Μ of the parameter θ is: The mean squared error of the estimator Θ Μ ) = πΈ(Θ Μ − θ)2 πππΈ(Θ Likelihood function: πΏ(π) = ∏ππ=1 π(π₯π ) Suppose a random experiment consists of a series of n trials. Assume that 1) The result of each trial is classified into one of k classes. 2) The probability of a trial generating a result in class 1 to class k is constant over trials and equal to p1 to pk. 3) The trials are independent The random variables X1, X2,…,Xn that denote the number of trials that result in class 1 to class k have a multinomial distribution and the joint probability mass function is π! π₯ π₯ π₯ π(π1 = π₯1 , π2 = π₯2 , … , ππ = π₯π ) = π 1 π 2 … ππ π π₯1 ! π₯2 ! … π₯π ! 1 2 πππ π₯1 + π₯2 + β― + π₯π = π πππ π1 + π2 + β― + ππ = 1 πΈ(ππ ) = πππ , π(ππ ) = πππ (1 − ππ ) If x1, x2, … , xn is a sample of n observations, the sample variance is: (∑ππ=1 π₯π )2 π 2 ∑ππ=1(π₯π − π₯Μ )2 ∑π=1 π₯π − π π 2 = = π−1 π−1 Confidence interval on the mean, variance known: π₯Μ − π§πΌ/2 π/√π ≤ π ≤ π₯Μ + π§πΌ/2 π/√π π§πΌ/2 π 2 πΜ − π ) , πΈ = |π₯Μ − π| π= , πΆβππππ ππ π = ( πΈ π/√π Confidence interval on the mean, variance unknown: π₯Μ − π‘πΌ/2,π−1 π /√π ≤ π ≤ π₯Μ + π‘πΌ/2,π−1 π /√π πΜ − π π= π/√π Random sample normal disr. mean=µ, var=σ2, S2=sample var. (π − 1)π 2 π2 = βππ π 2 πππ π‘. π€ππ‘β π − 1 πππππππ ππ πππππππ π2 Ci on variance, s2=sample variance, σ2 unknown (π − 1)π 2 (π − 1)π 2 ≤ π2 ≤ 2 ππΌ2,π−1 π1−πΌ,π−1 2 2 Lower and upper confidence bounds on σ2: (π − 1)π 2 (π − 1)π 2 ≤ π 2 πππ π 2 ≤ 2 2 ππΌ,π−1 π1−πΌ,π−1 Binomial proportion: If n is large, the distribution of π= π − ππ √ππ(1 − π) = πΜ − π √π(1 − π) π is approximately standard normal. Ci on binomial proportion (obs, lower, upper change zα/2 to zα): πΜ (1 − πΜ ) πΜ (1 − πΜ ) ≤ π ≤ πΜ + π§πΌ/2 √ π π Sample size for a specified error on binomial proportion: π§πΌ 2 π = ( 2 ) π(1 − π), π ππ max πππ π = 0.5 πΈ Prediction int. on a single future observation from norm. dist: π₯Μ − π‘πΌ/2,π−1 π √1 + 1/π ≤ ππ+1 ≤ π₯Μ + π‘πΌ/2,π−1 π √1 + 1/π Ci, difference in mean, variances known: πΜ − π§πΌ/2 √ π12 π22 π12 π22 π₯Μ 1 − π₯Μ 2 − π§πΌ/2 √ + ≤ π1 − π2 ≤ π₯Μ 1 − π₯Μ 2 + π§πΌ/2 √ + π1 π2 π1 π2 for one-sided, change zα/2 to zα. Sample size for a c.i. on difference in mean, variances known: π§πΌ/2 2 2 ) (π1 + π22 ) π=( πΈ Ci Case 1, difference in mean, variance unknown & equal: 1 1 π₯Μ 1 − π₯Μ 2 − π‘πΌ/2,π1+π2−2 π π √ + ≤ π1 − π2 π1 π2 1 1 ≤ π₯Μ 1 − π₯Μ 2 + π‘πΌ/2,π1+π2−2 π π √ + π1 π2 (π1 − 1)π12 + (π2 − 1)π22 π1 + π2 − 2 Ci Case 2, difference in mean, variance unknown, not equal: ππ2 = π 12 π 22 π 12 π 22 π₯Μ 1 − π₯Μ 2 − π‘πΌ/2,π √ + ≤ π1 − π2 ≤ π₯Μ 1 − π₯Μ 2 + π‘πΌ/2,π √ + π1 π2 π1 π2 2 π 2 π 2 ( 1 + 2) π1 π2 π= 2 (π 1 /π1)2 (π 22 /π2 )2 + π1 − 1 π2 − 1 ν is degrees of freedom for tα/2,if not integer, round down. Ci for µD from paired samples: πΜ − π‘πΌ/2,π−1 π π· /√π ≤ ππ· ≤ πΜ + π‘πΌ/2,π−1 π π· /√π Approximate ci on difference in population proportions: πΜ1 (1 − πΜ1 ) πΜ 2 (1 − πΜ 2 ) πΜ1 − πΜ 2 − π§πΌ/2 √ + ≤ π1 − π2 π1 π2 πΜ1 (1 − πΜ1 ) πΜ 2 (1 − πΜ 2 ) ≤ πΜ1 − πΜ 2 + π§πΌ/2 √ + π1 π2 Hypothesis test: 1. Choose parameter of interest 2. H0: 3. H1: 4. α= 5. The test statistic is 6. Reject H0 at α= … if 7. Computations 8. Conclusions Test on mean, variance known πΜ − π0 π»0 : π = π0 , π0 = π/√π Alternative hypothesis Rejection criteria H1: µ ≠ µ0 z0 > zα/2 or z0 < -zα/2 H1: µ > µ0 z0 > zα H1: µ < µ0 z0 < -zα Test on mean, variance unknown πΜ − π0 π»0 : π = π0 , π0 = π/√π Alternative hypothesis Rejection criteria H1: µ ≠ µ0 t0 > tα/2,n-1 or t0 < -tα/2, n-1 H1: µ > µ0 t0 > tα,n-1 H1: µ < µ0 t0 < -tα,n-1 Test in the variance of a normal distribution: (π − 1)π 2 π»0 : π 2 = π02 , π02 = π02 Alternative hypothesis Rejection criteria 2 2 H1: σ2 ≠π02 π02 > ππΌ/2,π−1 ππ π02 < −ππΌ/2,π−1 2 H1: σ2 > π02 π02 > ππΌ,π−1 2 H1: σ2 < π02 π02 < −ππΌ,π−1 Approximate test on a binomial proportion: π − ππ0 π»0 : π = π0 , π0 = √ππ0 (1 − π0 ) Alternative hypothesis Rejection criteria (**) H1: p ≠ p0 z0 > zα/2 or z0 < -zα/2 H1: p > p0 z0 > zα H1: p < p0 z0 < -zα App. Sample size for a 2-sided test on a binomial proportion: 2 π§πΌ/2 √π0 (1 − π0 ) + π§π½ √π(1 − π) ] , πππ 1 − π ππππ π’π π π§πΌ π=[ π − π0 Test on the differens in mean, variance known πΜ 1 − πΜ 2 − β0 π»0 : π1 − π2 = β0 , π0 = π2 π2 √ 1+ 2 π1 π2 Alternative hypothesis Rejection criteria H1: π1 − π2 ≠ β0 z0 > zα/2 or z0 < -zα/2 H1: π1 − π2 > β0 z0 > zα H1: π1 − π2 < β0 z0 < -zα Sample size, 1-sided test on difference in mean, with power of at least 1-β, n1=n2=n, variance known: 2 (π§πΌ + π§π½ ) (π12 + π22) π= (β − β0 )2 Tests on diff. in mean, variances unknown and equal: πΜ 1 − πΜ 2 − β0 π»0 : π1 − π2 = β0 , π0 = 1 1 ππ √ + π1 π2 Alternative hypothesis Rejection criteria H1: π1 − π2 ≠ β0 π‘0 > π‘πΌ/2,π1+π2−2 ππ π‘0 < −π‘πΌ/2,π1+π2−2 H1: π1 − π2 > β0 π‘0 > π‘πΌ,π1 +π2−2 H1: π1 − π2 < β0 π‘0 < −π‘πΌ,π1+π2−2 Tests on diff. in mean, variances unknown and not equal: πΜ 1 − πΜ 2 − β0 If π»0 : π1 − π2 = β0 is true, the statistic π0 = π2 π2 √ 1+ 2 π1 π2 is distributed app. as t with ν degrees of freedom, ~π‘(π) Paired t-test: Μ − π₯0 π· ππ· π1 − π2 π»0 : ππ· = π1 − π2 = Δ0 , π0 = , π= = ππ· √π12 + π22 ππ· /√π Alternative hypothesis Rejection criteria H1: ππ· ≠ Δ0 t0 > tα/2,n-1 or t0 < -tα/2, n-1 H1: ππ· > Δ0 t0 > tα,n-1 H1: ππ· < Δ0 t0 < -tα,n-1 Approximate tests on the difference of two population proportions: πΜ1 − πΜ2 π1 + π2 π»0 : π1 = π2 , π0 = , πΜ = , π ππ (∗∗) ↑ π1 + π2 1 1 √πΜ (1 − πΜ ) ( + ) π1 π2 Goodness of fit: π (π − πΈ )2 π π 2 π02 = ∑ > ππΌ,π−π−1 πΈπ π=1 Expected frequency: πΈπ = πππ , ππ = π(π = π₯) = π(π₯) The power of a test: = 1 − π½ Δ − Δ0 π½ = Φ zα/2 − σ2 √ 1 n1 + Δ − Δ0 − Φ −zα/2 − σ22 σ2 σ2 √ 1+ 2 n1 n2 n2 ( ) ( ) The P-value is the smallest level of significance that would lead to rejection of the null hypothesis H0 with the given data. 2[1 − Φ(|π§0 |)] πππ π π‘π€π − π‘πππππ π‘ππ π‘: π»π : π = π0 π»1 : π ≠ π0 π»1: π > π0 π = {1 − Φ(z0 ) πππ π π’ππππ − π‘πππππ π‘ππ π‘: π»π : π = π0 Φ(z0 ) πππ π πππ€ππ − π‘πππππ π‘ππ π‘: π»π : π = π0 π»1 : π < π0 Fitted or estimated regression line: π¦Μ = π½Μ0 + π½Μ1 π₯ π π 1 1 π½Μ0 = π¦Μ − π½Μ1 π₯Μ , π¦Μ = ( ) ∑ π¦π , π₯Μ = ( ) ∑ π₯π , πππ = πππ + πππΈ π π π=1 π=1 (∑ππ=1 π¦π )(∑ππ=1 π₯π ) π π ππ₯π¦ ∑π=1 π¦π π₯π − π π½Μ1 = = , ππ = π¦π − π¦Μπ , πππΈ = ∑ ππ2 π 2 (∑ ) π₯ ππ₯π₯ π π=1 ∑ππ=1 π₯π2 − π=1 π π π πππΈ πΜ 2 = , πππΈ = πππ − π½Μ1 ππ₯π¦ , πππ = ∑ (π¦π −π¦Μ )2 = ∑ π¦π2 − ππ¦Μ 2 π−2 π=1 π=1 Ci: π½1 ∈ (π½Μ1 ± π‘πΌ/2,π−2 √ Μ2 π ππ₯π₯ π 2 = πππ πππ =1− πππΈ πππ 1 π₯Μ 2 π ππ₯π₯ ) , π½0 ∈ (π½Μ0 ± π‘πΌ/2,π−2 √πΜ 2 [ + , πππ = π½Μ1 ππ₯π¦ , πΉ0 = πππ 1 πππΈ π−2 = πππΈ πππΈ ])