16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde Lecture 6 Example: Sum of two independent random variables Z=X+Y b () (fzdz= Pa < Z ≤ b) ∫ z a (= Pa< X + Y ≤ b) ( = Pa? X < Y ≤ b? X ) ( ) ( = lim ∑ Px< X ≤ x + dxPa ? x < Y ≤ b? x) dx→0 x bx ? = lim ∑ f ( x dx f y dy ) ( ) dx→0 x ∫ y x ax? ∞ bx ? () y ( )f x dx ∫ f y dy = ∫ x ?∞ ax? We can reach this same point by just integrating the joint probability density function for X and Y over the region for which the event is true. In the interior strip, the event az≤ b is true.< Page 1 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde ∞ bx? ( <≤ b) = dx f , (x y dyP a Z ∫∫ xy , ) ?∞ ax? ∞ bx? () f y dy dx f x ∫ = ∫ x y ( ) ??∞ ax Let zx ,=+ y dz= dy ∞ b dx f x ∫ ( )() f z ? x dz= ∫ x y ?∞ a b ∞ ? ? ? f x f z ? x dx dz () y ( ) ?x = ∫∫ a ??∞ ? This is true for all a,b. Therefore: ∞ () = f x f z ? xdxf z ∫ x ( ) y ( ) z ?∞ ∞ () ( )f y yf z ? ydy= ∫ x ?∞ This result can readily be generalized to the sum of more independent random variables. Z = X 1 + X 2 + ... + X n ∞ ∞ ∞ f (z) = dx 1 dx 2 ... ∫ dx n?1 f (x f (x )... f (x n?1 ) f x n (z ? x ? x 2 ? ... ? x ) x 1 x n?1 1 n?1z ∫∫ 1 ) x 2 2 ?∞ ?∞ ?∞ Also, if WY=? X , for X,Y independent: ∞ () = f x f w + xdxf w ∫ x ( ) y ( ) w ?∞ ∞ () ( )f y yf y ? wdy= ∫ x ?∞ Direct determination of the joint probability density of several functions of several random variables Suppose we have the joint probability density function of several random variables X,Y,Z, and we wish the joint density of several other random variables defined as functions X,Y,Z. =  (Uu XYZ ),, Vv XY Z )=  ( ,, = i (Ww XY Z ),, Page 2 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde If f (, , ,, uvw) can be found directlyxyz) is finite everywhere, the density f (,, ,,xyz uvw by the following steps: 1. Evaluate the Jacobian of the transformation from X,Y,Z to U,V,W. (, ,?uxyz ) ?x (, ,?vxyz ) (, ,Jxyz ) = ?x  (, ,?wxyz ) ?x (, ,?uxyz ) ?y (, ,?vxyz ) ?y  (, ,?wxyz ) ?y (, ,?uxyz ) ?z (, ,?vxyz ) ?z  (, ,?wxyz ) ?z 2. For every value of u,v,w, solve the transformation equations for x,y,z. If there is more than one solution, get all of them.  ( ,, ? i (,, uXY Z )= u ? ? x uvw )  ( ,, (,, vXY Z )= v ? ? → ? y uvw ) i  ( ,, ? z uvw )wXY Z )= w ? ? ? (,, i 3. Then (, , xy z ) f (,, ,, i i uvw ) = ∑ f xyz i ,,uvw (, , Jx y z ) i i i k with x i ,y i ,z i given in terms of u,v,w. This approach can be applied to the determination of the density function for m variable which are defined to be functions of n variables (n>m) by adding some simple auxiliary variables such as x,y,etc. to the list of m so as to total n variables. Then apply this procedure and finally integrate out the unwanted auxiliary variables. Example: Product U=XY To illustrate this procedure, suppose we are given f xy (,xy) and wish to find , the probability density function for the product U = XY . First, define a second random variable; for simplicity, choose V = X . Then use the given 3 step procedure. 1. Evaluate the Jacobian: yx (,Jxy ) = =? x 10 2. Solve the transformation equations: ? x = v xy = u ? ? ? ? ? u u =vx ? y == ? ? x v 3. Then find: 1 f (,uv ) = f xy (v, u ) ,uv , v v Page 3 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde To get the density for the product only, integrate out with respect to v. ∞ () = ∫ 1 f u f xy (v, u )dv u , u v ?∞ If X and Y are independent this becomes ∞ 1 u () =fu ∫ ( ) ?? f vf y ?? dv, or u x v v ?? ?∞ ∞ 1 u () =f u ∫ ( ) ?? f xf y ?? dx u x x x ?? ?∞ The Uniform Distribution In our problems we have been using the uniform distribution without having concisely defined it. This is a continuous distribution in which the probability density function is uniform (constant) over some finite interval. Thus a random variable having a uniform distribution takes values only over some finite interval (a,b) and has uniform probability density over that interval. In what situation does it arise? Examples include part tolerances, quantization error, limit cycles. Often you do not know anything more than that the unknown value lies between known bounds. Page 4 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde 1 2 ? 2 b X = ∫ x 1 dx = 2 (b a ) ba ba? ? a 1 = (ab)+ 2 b X 2 1 1 3 = ∫ x 2 1 dx = (b a 3 )? ba 3 ba? ? a 2 = 1 (a abb 2 )++ 3 2 X 2 2 σ = ? = 1 (a ab b 2 ) 2ab b 2 )X 2 ++ ? 1 (a 2 + + 3 4 = 1 (a 2 ? + 2abb 2 ) 12 = 1 (ba) 2 ? 12 1 σ = (ba)? 12 The Binomial Distribution Outline: 1. Definition of the distribution 2. Determination of the binomial coefficient and binomial distribution 3. Useful relations in dealing with binomial coefficients and factorials 4. The mean, mean square, and variance of the binomial distribution 1. Definition of the distribution Consider an experiment in which we identify two outcomes: one of which we call success and the other failure. The conduct of this experiment and the observation of the outcome may be called a simple trial. If the trial is then repeated under such circumstances that we consider the outcome on any trial to be independent of the outcomes on all other trials, we have a process frequently called Bernoulli Trials after the man who first studied at length the results of such a process. The number of successes in n Bernoulli trials is a random discrete variable whose distribution is known as the Binomial Distribution. Note that the binomial distribution need not refer only to such simple situations as observing the number of heads in n tosses of a coin. An experiment may have a great many simple outcomes – the outcomes may even be continuously Page 5 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde distributed – but for some purposes we may choose to regard some collection of the simple events as success, and employ the binomial distribution to study such successes. For example, in the manufacture of transistors, the resistivity of each crystal is measured after the crystal is drawn. The resistivity of a crystal may be regarded as a random variable taking values over a continuous range, but for the purposes of quality control in the manufacturing process, the occurance of any resistivity value within the specified tolerance may be regarded as success and all other values as failure. From this point of view, the experiment of measuring the resistivity of a crystal has only two outcomes. How many units must be produced to yield P=0.95 (for example) that 100 will be within specifications. Or, for a given yield, how many units must be manufactured to achieve a P=0.95 of getting 100 “in-spec” items (not sequentially evaluated). 2. Determination of the binomial coefficient and binomial distribution The probability of any specified arrangement of k successes and n-k failures in n knk independent trials is p q ? where p is the probability of success on any one trial and q=1-p is the probability of failure. The probability of exactly k successes in n kn k trials is then p q ? times the number of arrangements in which exactly k successes occur. This is due to the fact that the different arrangements are mutually exclusive so their probabilities add. The probability of exactly k successes in n trials where p is the probability of success on each individual trial is n ?? n ()= ?? p k (1? p) n?k = ?? k n?k k p q Pk k ?? ?? ?? n ?? The number ?? is called the binomial coefficient since it is exactly the coefficient k ?? of the k th term in the binomial expansion of (ab) n .+ n n n ?? k n?k +(ab) = ∑?? a b k k =0?? 3. Useful relations in dealing with binomial coefficients and factorials n ?? Use the convention that for integral n, ?? = 0 for k<0 and for k>n. Also use the k ?? conventions that Page 6 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde n ?? ?? =1 0 ?? n ?? ?? =1 n ?? Useful relations involving sums of binomial coefficients: n ? n ? ?? ? n +1 ? + = ? ? ?? ? ? , n any number k ? k ?1 ???? k ? ?? ?? ?? n n n n ?? ?? + + ?? = 2 , n a positive integer + ... 0 1 n ?? ?? ?? n n n ?? ?? ?? ?? ?? + ± ?? = 0, n a positive integer ? ... 0 1 n ?? ?? ?? 4. The mean, mean square, and variance of the binomial distribution Gs k k () = ∑ p s k n n ?? kn?k k = ∑?? p qs k k =0 ?? n n ?? k n?k k psq= ∑?? () k =0 ?? n = ( ps + q) The moments can be derived from this using dG (= nps + q) n?1 p ds 2 dG ( 2 = nn ?1)( ps + q) n?2 p ds 2 dG X = = np ds s=1 2 X 2 dG dG = + ds 2 ds s=1 s=1 (= nn ?1) p 2 +np 2 2 σ = X ? X 2 2 2 2 2 = n p ?np 2 +np ?n p = npq Page 7 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde The Poisson Distribution Outline: 1) Discussion of the significance of the distribution 2) Summarize the derivation of the distribution 3) The Poisson approximation to the Binomial distribution 1. Discussion of the significance of the distribution The Posson distribution is a discrete integer-valued distribution which is of great importance in practical problems. It is employed in the study of telephone traffic through a switchboard, of the emission of B rays from radioactive material, of the emission of electrons from heated filaments and photo-sensitive surfaces, of line surges in a power transmission system due to the throwing of switches, of demands for service in a store or stockroom, and others. Using the statistics of the Poisson distribution, one answers questions related to the number of telephone operators, or stock clerks, or turnstiles in the subway which are required to yield a certain quality of service – where the quality of service is defined in terms of the probability that a customer will have to wait, or the expectation of the time he must wait, or the like. In control system analysis, the Poisson distribution may well lead to an excellent statistical description of the inputs seen by a system, or the occurrence of disturbances, etc. This distribution applies – in rough terms – to situations in which events occur at (,, random over an interval I and we wish to know the probability Pk Iλ) of the occurrence of exactly k events in the subinterval I 1 , of I where λ is the average rate of occurrence of the events – which may possibly vary over the interval. Very often the interval is time: thus we ask the probability that exactly k electrons be emitted in a given length of time. However, other dimensions may equally well apply – such as intervals of distance. They may even be multidimensional – units of surface area or volume. An example of an interval of volume is given by the statistics of the number of bacteria in volume samples of blood. In the “aerodynamics” of very high altitudes we may very well employ the Poisson distribution to give the probability of occurrence of k atoms in a specified volume. The conditions under which the Poisson distribution may be expected to apply are given by the assumptions under which the distribution is derived. Page 8 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde Example: Telephone calls throughout a business day where λ is the average number of phone calls per minute. () = 1 μ k e ?μ P(exactly k events in an interval (t , t )) = Pk 12 k ! t 2 ()dwhere μ = ∫ λτ τ . t 1 2. Summarize the derivation of the distribution In an analytic derivation of the distribution, the following assumptions are made: a. The occurrence of events in all non-overlapping intervals are independent. b. The probability of the occurrence of 1 event in an infinitesimal interval dI is an infinitesimal of the order of dI; the probability of occurrence of more than one event in that interval is an infinitesimal of higher order than dI. These assumptions permit the derivation of the distribution; thus if the circumstances of a given situation seem to meet these conditions, the Poisson distribution may be expected to apply. The derivation proceeds by determining the probabilities for 0 and 1 event which establish an apparent functional form for the distribution, then by proving the form by showing in general that the form holds for 0 and 1 and that if it holds for n, it holds also for n+1. The derivation is developed in adequate detail in the text, and leads to the general form of the Poisson distribution: () = 1 μ e ?μ , where μ = ∫ t 2 λτ τ Pk k ( )d k ! t 1 This is the probability of exactly k events in the interval (t 1 ,t 2 ) in which λ t()is the average rate of occurrence of events over the interval. Page 9 of 10 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde If the average rate is the constant λ , and the interval length is written as t, the probability of k events in the interval t becomes t e ?λt ()= 1 (λ ) k Pk k! k Gs k ()= ∑ ps k ∞ k ?μ k = ∑ 1 μ es k=0 k! ?μ ∞ () k = e ∑ μs k=0 k! ?μμs = ee s? = e μ(1) Page 10 of 10