/
Indicators: Now With Pair Indicators: Now With Pair

Indicators: Now With Pair - PDF document

eve
eve . @eve
Follow
342 views
Uploaded On 2021-03-17

Indicators: Now With Pair - PPT Presentation

1 wise Flavor Recall I i is indicator variable for event A i when Let X of events that occur Now consider pair of events A i A j occurring I i I j 1 if both events A i a ID: 832056

server var variables requests var server requests variables events random sample covariance independent servers cov cluster computer event occur

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Indicators: Now With Pair" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1Indicators: Now With Pair-wise Flavo
1Indicators: Now With Pair-wise Flavor!•Recall Iiis indicator variable for event Aiwhen:Let X = # of events that occur:•Now consider pair of events AiAjoccurringIiIj= 1 if both events Aiand Ajoccur, 0 otherwiseNumber of pairs of events that occur is From Event Pairs to Variance•Expected number of pairs of events:•Recall: Var(X) = E[X2] –(E[X])2Let’s Try It With the Binomial•X ~ Bin(n, p)Each trial: Xi~ Ber(p)Let event Ai= trial iis success (i.e., Xi= 1)Computer Cluster Utilization•Computer cluster with N serversRequests independently go to server iwith probability piLet event Ai= server ireceives no requestsX = # of events A1, A2,  Anthat occurY  # servers that receive ≥ 1 request  N –XE[Y] after first nrequests?Since requests independent:Computer Cluster Utilization (cont.)•Computer cluster with N serversRequests independently go to server iwith probability piLet event Ai= server ireceives no requestsX = # of events A1, A2,  Anthat occurY  # servers that receive ≥ 1 request  N –XVar(Y) after first nrequests?Independent requests:( = (-1)2 Var(X) = Var(X) )Computer Cluster = Coupon Collecting•Computer cluster with N serversRequests independently go to server iwith probability piLet event Ai= server ireceives no requestsX = # of events A1, A2,  Anthat occurY  # servers that receive ≥ 1 request  N –X•This is really another Coup

on Collector” problemEach server
on Collector” problemEach server is a coupon type”Request to server = collecting a coupon of that type•Hash table versionEach server is a bucket in tableRequest to server = string gets hashed to that bucket2Product of Expectations•Let X and Y are independent random variables, and g() and h() are real-valued functionsProof:The Dance of the Covariance•Say X and Y are arbitrary random variables•Covariance of X and Y:•Equivalently:X and Y independent, E[XY] = E[X]E[Y] Cov(X,Y) = 0But Cov(X,Y) = 0 does notimply X and Y independent!Dependence and Covariance•X and Y are random variables with PMF:E[X] = 0, E[Y] = 1/3Since XY = 0, E[XY] = 0Cov(X, Y) = E[XY] –E[X]E[Y] = 0 –0 = 0•But, X and Y are clearly dependentXY-101pY(y)01/301/32/3101/301/3pX(x)1/31/31/31Example of Covariance•Consider rolling a 6-sided dieLet indicator variable X = 1 if roll is 1, 2, 3, or 4Let indicator variable Y = 1 if roll is 3, 4, 5, or 6•What is Cov(X, Y)?E[X] = 2/3 and E[Y] = 2/3E[XY]== (0 * 0) + (0 * 1/3) + (0 * 1/3) + (1 * 1/3) = 1/3Cov(X, Y) = E[XY] –E[X]E[Y] = 1/3 –4/9 = -1/9Consider: P(X = 1) = 2/3 and P(X = 1 | Y = 1) = 1/2oObserving Y = 1 makes X = 1 lesslikelyAnother Example of Covariance•Consider the following data:WeightHeightWeight * Height645736487159418953492597676241545551280558502900775542355748273656422352514221427661463668573876E[W] = 62.75E[H] = 52.75E[W*

H]= 3355.83303540455055606540
H]= 3355.833035404550556065404550556065707580HeightWeightCov(W, H) = E[W*H] –E[W]E[H]= 3355.83 –(62.75)(52.75)= 45.77Properties of Covariance•Say X and Y are arbitrary random variables•Covariance of sums of random variablesX1, X2, , Xnand Y1, Y2, , Ymare random variables3Variance of Sum of Variables•Proof:If all Xiand Xjindependent (i j): Note:By symmetry:Hola Compadre: La Distribución Binomial•Let Y ~ Bin(n, p)nindependent trialsLet Xi= 1 if i-th trial is success”, 0 otherwiseXi~ Ber(p)E[Xi] = pVar(Y) = Var(X1) + Var(X2) + ... + Var(Xn)Var(Xi)= E[Xi2] –(E[Xi])2= E[Xi] –(E[Xi])2since Xi2= Xi= p –p2= p(1 –p)Var(Y) = nVar(Xi) = np(1 –p)Variance of Sample Mean•Consider nI.I.D. random variables X1, X2, ... XnXi have distribution Fwith E[Xi] = mand Var(Xi) = s2We call sequence of Xia samplefrom distribution FRecall sample mean: whereWhat is ?Sample Variance•Consider nI.I.D. random variables X1, X2, ... XnXi have distribution Fwith E[Xi] = mand Var(Xi) = s2We call sequence of Xia samplefrom distribution FRecall sample mean: whereSample deviation: for i = 1, 2, ..., nSample variance:What is E[S2]?E[S2] = s2We say S2is unbiased estimate” of s2Proof that E[S2] =s2(just for reference)So, E[S2] = s