Randomness in Computing L ECTURE 8 Last time • Variance, covariance • Chebyshev’s inequality • Variance of Binomial and Geometric RVs In Discussion • Median of a RV Today • Computing the median of an array 2/19/2020 Sofya Raskhodnikova;Randomness in Computing
Median of a random variable • A value 𝑛 is the median of a random variable 𝑌 if Pr 𝑌 ≤ 𝑛 ≤ 1/2 and Pr 𝑌 ≥ 𝑛 ≤ 1/2 . • Example 1: 𝑌 is uniform over 𝑦 1 , … , 𝑦 2𝑙+1 , where 𝑦 1 < ⋯ < 𝑦 2𝑙+1 . What is the median? • Example 2: 𝑌 is uniform over 𝑦 1 , … , 𝑦 2𝑙 , where 𝑦 1 < ⋯ < 𝑦 2𝑙 . Find all medians. Sofya Raskhodnikova; Randomness in Computing 2/19/2020
Median and mean: another view • Theorem. For a random variable X with a finite expectation 𝜈 and a finite median 𝑛 , 1. the expectation 𝜈 is the value of c that minimizes the expression 𝑌 − 𝑑 2 ; 𝐹 2. the median 𝑛 is a value of 𝑑 that minimizes the expression 𝐹 |𝑌 − 𝑑| . Sofya Raskhodnikova; Randomness in Computing 2/19/2020
Median and mean are close • Theorem. For a random variable X with expectation 𝜈, median 𝑛 , and standard deviation 𝜏, 𝜈 − 𝑛 ≤ 𝜏. Sofya Raskhodnikova; Randomness in Computing 2/19/2020
Randomized Algorithm for the Median of an Array • On the board Sofya Raskhodnikova; Randomness in Computing 2/19/2020
Recommend
More recommend