Summary

This document covers probability concepts including conditional probability, Bayes theorem, random variables, and distributions. It also details measures of central tendency and dispersion. Examples and exercises are provided to reinforce the theory.

Full Transcript

## Probability, Statistics ### Probability of Events * $P(A) = \frac{N(A)}{N(S)}$ * N(A): Number of elements * N(S): Total number of elements **Example:** If a fair coin is tossed twice, what is the probability of getting at least one head? S = {HH, HT, TH, TT} A = {HH, HT, TH} P(A)...

## Probability, Statistics ### Probability of Events * $P(A) = \frac{N(A)}{N(S)}$ * N(A): Number of elements * N(S): Total number of elements **Example:** If a fair coin is tossed twice, what is the probability of getting at least one head? S = {HH, HT, TH, TT} A = {HH, HT, TH} P(A) = 3/4 = 0.75 ### Properties of Probability 1. 0 < P(A) < 1 2. P(A) = 1 - P(A) 3. P(A∪B) = P(A) + P(B) (if A and B are mutually exclusive) 4. P(A∪B) = P(A∩B) 5. P(A∩B) = P(A∪B) 6. P(A∩B) = P(A) - P(A∩B) **Example:** If P(A) = 1/3, P(B) = 1/2, P(A∩B) = 1/6, find: P(A∪B) 1. P(A∪B) = P(A) + P(B) - P(A∩B) * = 1/3 + 1/2 - 1/6 = 2/3 2. P(A) = 1 - P(A) * = 1 - 1/3 = 2/3 3. P(B) = 1 - P(B) * = 1 - 1/2 = 1/2 4. P(A∩B) = P(A∪B) = 1 - P(A∪B) * = 1 - 2/3 = 1/3 5. P(A∪B) = P(A∩B) = 1 - P(A∩B) * = 1 - 1/6 = 5/6 ### Conditional Probability * P(A/B) = P(A∩B)/P(B) (if P(B) ≠ 0) * P(A∩B) = P(A)⋅P(B) (if A and B are independent) **Example:** Flip a coin and then roll a die. What is the probability of observing heads on the coin and 2 or 3 on the die? P(A∩B) = P(A)⋅P(B) =(1/2)⋅(1/3) = 1/6 **Example:** Let P(A) = 0.4, P(A∪B) = 0.6. For what P(B) are A and B independent? P(A∪B) = P(A) + P(B) - P(A∩B) 0.6 = 0.4 + P(B) - P(A)⋅P(B) 0.2 = 0.6 P(B) P(B) = 0.2/0.6 = 1/3 ### Bayes Theorem * P(A) = Σ P(A∩Bi) * P(A) = Σ P(Bi)⋅P(A/Bi) * P(Bi/A) = P(A∩Bi)/P(A) **Example:** Two boxes containing marbles are placed on a table. The boxes are labeled B1 and B2. Box B1 contains 7 green, 4 white marbles. Box B2 contains 3 green and 10 yellow. The probability of selecting box B1 is 1/2 and B2 is 1/3, P(B1) = 1/2 P(B2) = 1/3. Is she selecting a green? **Solution:** 1. The probability that she will win the TV: * P(A) = ΣP(A∩Bi) = P(B1)⋅P(A|B1)+P(B2)⋅P(A|B2) * = (1/2)⋅(7/11)+(1/3)⋅(3/13) = 0.365 2. The probability that the green was selected from the first box: * P(B1/A) = P(B1)⋅P(A|B1)/P(A) * = (1/2)⋅(7/11)/(0.365) = 0.58 ### Random Variables and Distribution Functions * **Discrete:** Random variable can take only finitely many values. * **Continuous:** Random variable can take any value in a given range. * **Probability Density Function (PDF):** Gives the probability of the random variable taking a certain value. * **Cumulative Distribution Function (CDF):** Gives the probability of the random variable taking a value less than or equal to a given value. * **Distribution Function of Discrete:** Σ P(X = x) = 1 * **Distribution Function of Continuous:** ∫ P(x)dx = 1 **Example:** Consider X = {1, 2, 3}. Find the CDF if the PDF is f(x) = k(2x-1). * F(x) = ∑k(2x-1) = 1 * k(1+3+5) = 1 * k = 1/9 * ∴ F(x) = (1/9)(2x-1) * F(1) = f(1) = (1/9)(2−1) = 1/9 * F(2) = F(1) + f(2) = 1/9 + (1/9)(2-1) = 2/9 * F(3) = F(1) + F(2) + f(3) = 1/9 + 2/9 +(1/9)(4-1) = 4/9 **Example:** Find the CDF for the following function: * f(x) = cx²+x; 0 ≤ x ≤ 1 * f(x) = 0; otherwise ∫(cx²+x)dx = (c(x³/3)+x²/2)|_0^1 = 1 ⇒ c = 3/2 * F(x) = (3/2)(x³/3)+x²/2 = 3/2 * x³ + x²/2; 0 ≤ x ≤ 1 ### Moment of Random Variables (Expectation) * **E(X):** The expectation of the random variable X. * **Var(X):** The variance of the random variable X. * **Discrete:** E(X) = ∑ X⋅ P(X) * **Continuous:** E(X) = ∫ X⋅ P(X)dx * **E(ax+b) = a E(X) + b (a and b are constants)** * **Var(X) = E[(X-μ)²]** * Discrete: Var(X) = Σ(X-μ)² ⋅ P(X) * Continuous: Var(X) = ∫(X-μ)²⋅ P(X) dx * **Var(ax+b) = a² Var(X)** **Example:** Find E(X), Var(X) for the variable X: | X | 1 | 2 | 5 | |---|---|---|---| | P(X) | 1/3 | 1/3 | 1/3 | * E(x) = 1(1/3)+2(1/3)+5(1/3) = 8/3 * Var(x) = E(x²) - (E(x))² = (1/3)(1² + 2² + 5²) - (8/3)² = 2.6875 **Example:** Let P(X) = 1/2 (2 ≤ x ≤ 7) and 0 otherwise. Find **E(X)**, **E(2x-3)**, and **Var(2x-1)**. * E(X) = ∫ xf(x)dx = ∫(2 ≤ x ≤ 7) (1/2)*x dx = 4.5 * E(2x-3) = 2E(x) - 3 = 2(4.5) - 3 = 6 * Var(X) = ∫(x-μ)²f(x)dx = ∫(2 ≤ x ≤ 7) (x-4.5)²(1/2) dx = 2.08 * Var(2x-1) = 2²⋅Var(X) * Var(2x-1) = 4⋅2.08 = 8.33 ### Special Discrete Distributions * **Binomial Distribution:** * P(x) = ⁿCₓ ⋅ Pˣ ⋅ (1-P)ⁿ⁻ˣ * n = Number of trials * x = Number of successes * P = Probability of success in a single trial **Example:** What is the probability of rolling two sixes and three non-sixes in 5 independent casts of a fair die? * P(x = 2) = ⁵C₂(1/6)²(5/6)³ = 0.160751 * **Poisson Distribution:** * P(x) = (e⁻λ λˣ)/x! * λ = Mean of the distribution **Example:** A random variable X has a Poisson distribution with λ = 3. What is the probability that X is bounded by 1 and 3? * P(1 < x < 3) = P(x = 1) + P(x = 2) + P(x = 3) * P(1 < x < 3) = (e⁻³ 3¹)/1! + (e⁻³ 3²)/2! + (e⁻³ 3³)/3! * P(1 < x < 3) = (e⁻³ 3¹)/1! + (e⁻³ 3²)/2! + (e⁻³ 3³)/3! * P(1 < x < 3) = 11e⁻³/2 = 0.122 ### Special Continuous Distributions * **Normal Distribution:** * f(x) = (1/σ√2π)⋅ e⁻(x-μ)²/2σ² * μ = Mean of the distribution * σ = Standard Deviation of the distribution * **Standard Normal Distribution:** * μ = 0 * σ = 1 **Example:** Find P(X<-1.2) if X~N(0,1) * P(X < -1.2) = 0.5 - P(X ≤ 1.2) * P(X < -1.2) = 0.5 - 0.3849 * P(X < -1.2) = 0.1511 **Example:** If X~N(3, 16), what is P(4<X<8)? * P(4<X<8) = P(4-3/4 < X-3/4 < 8-3/4) = P(1/4 < X-3/4 < 5/4) * P(4<X<8) = P(X < 1.25) - P(X ≤ 1.25) * P(4<X<8) = 0.3944 - 0.0987 * P(4<X<8) = 0.2957 **Example:** Find P(-1.2 ≤ x < 1.3) if x ~ N(0,1) * P(-1.2 ≤ x < 1.3) = P(0 ≤ x < 1.3) + P(x < -1.2) * P(-1.2 ≤ x < 1.3) = 0.4032 + 0.3849 * P(-1.2 ≤ x < 1.3) = 0.7881 ### Statistics * **Data:** A set of values. * **Grouped Data:** Data organized into categories (intervals). * **Ungrouped Data:** Data that is not organized into categories. **Measures of Central Tendency** * **Mean:** The average of a set of data. * M = (Σx)/n **Example:** Find the mean of the following data: 2, 5, 6, 7, 10, 4, 3 * M = (2+5+6+7+10+4+3)/7 = 37/7 = 5.282 * **Median:** The middle value in a set of data, when the data is ordered from least to greatest. * If the number of data points is even, the median is the average of the two middle values. * If the number of data points is odd, the median is the middle value. * **Mode:** The value that appears most often in a set of data. **Measures of Dispersion ** * **Variance (σ²):** A measure of how spread out the data is. * σ² = Σ(x-μ)²/n * **Standard Deviation (σ):** The square root of the variance. * σ = √σ² * **Range (R):** The difference between the largest and smallest values in a set of data. **Example:** Find σ² and σ for these data: 1, 3, 5 if μ = 3 * σ² = (1/3)[(1-3)²+(3-3)²+(5-3)²] * σ² = (1/3)[4+0+4] = 8/3 * σ = √(8/3) = √(8/3) ≈ 1.63 **Example:** From the following data, construct a frequency distribution table and find the standard deviation: 6, 8, 8, 8, 8, 13, 16, 1, 1, 11, 17, 3, 10, 4, 4, 8, 17, 3, 12, 11, 3, 17, 9, 11, 7, 2, 17, 1, 4 * R = U - L = 17 - 1 = 16 * W = R/K = 16 / 3.322 log(35). * W = **2.6** <br> | Class | Frequency (fi) | mi | mi⋅f | (mi-M)² | (mi-M)²⋅f | |---|---|---|---|---|---| | 1-3 | 9 | 2 | 18 | 36 | 324 | | 4-6 | 5 | 5 | 25 | 9 | 45 | | 7-9 | 8 | 8 | 64 | 0 | 0 | | 10-12 | 7 | 11 | 77 | 9 | 63 | | 13-15 | 2 | 14 | 28 | 36 | 72 | | 16-18 | 4 | 17 | 68 | 81 | 324 | | **Total** | **35** | 280| **828** | | **828** | * M = Σ(mi⋅f)/Σfi = 280 / 35 = 8 * σ² =(Σ(mi-M)²⋅fi)/Σfi = 828/35 = 23.7 * σ = √23.7 = 4.8

Use Quizgecko on...
Browser
Browser