EE255/CPS226 Conditional Probability and Expectation Dept. of Electrical & Computer engineering Duke University Email: bbm@ee.duke.edu, kst@ee.duke.edu 5/23/2019
Conditional pmf Conditional probability: Above works if x is a discrete rv. For discrete rv’s X and Y, conditional pmf is, Above relationship also implies, If x and y are mutually independent, then, p(y|x) = p(y). Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Independence, Conditional Distribution Conditional distribution function Using conditional pmf, Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Example n total jobs, k are passed on to server A Two servers k jobs p: prob. that the next job goes to serverA p A Poisson ( λ) Job stream Bernoulli trial n jobs 1-p B n total jobs, k are passed on to server A pY(k) = [(pk/k!)e-λ \sum_{k-n}^\infty \frac{\lambda^k (\lambda (1-p))^{n-k}}{(n-k)!} = (\lamda p)^k / k! \sum_{n=k}^\infty \frac{(\lambda (1-p))^{n-k}}{n-k!} substituting m= n-k gives the result. Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Conditional pdf For continuous rv’s X and Y, conditional pdf is, Also, Independent X, Y Marginal pdf, Conditional distribution function Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Conditional Reliability Software system after having incurred (i-1) faults, Ri(t) = P(Ti > t) (Ti : inter-failure times) Ti : independent exponentially distributed Exp(λi). λi : Failure rate itself may be random, then Conditional reliability: λi:: random that with fault occurrence, followed by its removal, failure rate λi changes (in a random manner denoted by the random variable Λi ). If ψi = a1+a2i, then what happens to E[Λi]and R_i(t) ? E[Λi] = 1/ψi = i.e. decreasing with i and there is a likelihood (but no guarantee) that R_i(t) improves with time. Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Mixture Distribution Conditional distribution: continuous and discrete rvs combined. Examples: (Response time | that there k processors), (Reliability| k components) etc. (Y: continuous, X:discrete) Compute server with r classes of jobs (i=1,2,..,r) Hence, Y follows an r-stage HyperExpo distribution. Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Mixture Distribution (contd.) What if fY|X(y|i) is not Exponential? The unconditional pdf and CDF are, Using LST, Moments can now be found as, Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Mixture Distribution (contd.) Such Mixture distrib.: arise in reliability studies. Software system: Modules (or objects) may have been written by different groups or companies, ith group contributes ai fraction of modules and has reliability characteristic given by Fi. Gp#1: EXP( λ1) (α frac); Gp#2: r-stage Erlang (1- α frac) Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Mixture Distribution (contd.) Y:continuous; X: continuous or uncountable, e.g., life time Y depends on the impurities X. Finally, Y:discrete; X: continuous Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Mixture Distribution (contd.) X: web server response time; Y: # of requests arriving while a request being serviced. For a given value of X=x, Y is Poisson, The joint pdf is, f(x,y) = pY|X(y|x)fX(x) Unconditional pmf pY(y) = P(Y=y) With (λ+μ)x = w, Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Conditional Moments Conditional Expectation is E[Y|X=x] or E[Y|x] E[Y|x]: a.k.a regression function For the discrete case, In general, then, The mathematical function used to describe the deterministic variation in the response variable is sometimes called the "regression function", the "regression equation", the "smoothing function", or the "smooth". [http://www.itl.nist.gov/div898/handbook/pmd/section1/pmd12.htm] Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Conditional Moments (contd.) This can be specialized to: kth moment of Y: E[Yk|X=x] Conditional MGF, MY|X(θ |x) = E[eθY|X=x] Conditional LST, LY|X(s|x) = E[e-sY|X=x] Conditional PGF, GY|X(z|x) = E[zY|X=x] Total Expectation: Total moments: Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Conditional Moments (contd.) Total transforms: In the previous example, Total expectation: Therefore, we can also talk of conditional MTTF MTTF may depend on impurities or operating temp. Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Conditional MTTF Y: time-to-failure may depend on the temperature, and the conditional MTTF may be: Let Temp be normal, Unconditional MTTF is: Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Imperfect Fault Coverage Hybrid k-out of-n system, with m cold standbys. Reliability depends on recovery from a failure. What if the failed module cannot be substituted by a standby? These are called not covered faults. Probability that a fault is covered is c (coverage factor) Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Fault Handling Phases Fault handling involves 3-distinct phases. Finite success probability for each phase finite coverage. c = P(“ok recovery”|”fault occurs”) = P(“fault detected” & “fault located” & “fault corrected” | “fault occurs”) = cd.cl.cr Fault Processing Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Near Coincident Faults Coincident fault: 2nd fault occurs while the 1st one has not been completely processed. Y: Random time to process a fault. X: Time at which coincident fault occurs (EXP(γ)). Fault coverage: prob. that Y < X Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Near Coincidence: Fault Coverage Fault handling has multiple phases. This gives: X:Life time of a system with one active + one standby λ: Active component’s failure rate; Y = 1 fault covered; Y = 0 fault not covered. c=0 or c=1? Ca is currently active and Cs acts as standby so that when Cafails and the fault covered, Cs becomes active. Similarly, now if Cs fails and this fault is covered, then Ca becomes the active component. Hence when the faults are covered, the life time is the sum of the life times of active and standby (2/λ). Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University
Life Time Distribution-Limited Coverage fX|Y(t|0): life time of the active comp. ~EXP(λ) fX|Y(t|1): life time of active+standby 2-stage Erlang Joint density fn: Marginal density fn: Reliability Bharat B. Madan, Department of Electrical and Computer Engineering, Duke University