16322 Stochastic Estimation and Control. Fall 2004 Prof vander velde Lecture 3 Last time: Use of Bayes'rule to find the probability of each outcome in a set of P(AIEE2,En) In the special case when E's are conditionally independent (though they all depend on the alternative, Ak), P(AIE.E-DP(E, |A) P(AIEE,Em)=P(AIErEm-1)P(En A) This is easy to do and can be done recursively Take E: P(AkE1= P(A)P(EA) ∑P(A)P(E1|4) Take e P(AIEE- P(AKIEP(E2I ∑P(4|E1)P(E2|A) Recursive application of Bayes rule Random variables Start with a conceptual random experiment e Discrete-valued random variable g Continuous-valued random variable The random variable is defined to be a function of the outcomes of the random experiment. Example: X= the number of spots on the top face of a die How to characterize a random variable Page 1 of 7
16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde Lecture 3 Last time: Use of Bayes’ rule to find the probability of each outcome in a set of ( | 1 P A E E , 2 ,... E ) k n In the special case when E’s are conditionally independent (though they all depend on the alternative, Ak), ( | 1, ( | 1... ( | k n P A E E 2 ,... E ) = P A E En−1)PE A ) . k n ( | 1 ∑P A E E ... ( | )PE A ) i n−1 n i i This is easy to do and can be done recursively. ( | ( )( | k 1 k Take E1: P A E ) = P A P E A ) k 1 ∑P A P E A ( ) ( | ) i 1 i i ( | ( | ) ( | k 1 2 k Take E2: P A EE ) = P A E P E A ) k 12 ∑P A E P E A ( | ) ( | ) i 1 2 i i Î Recursive application of Bayes’ rule. Random Variables Start with a conceptual random experiment: Î Continuous-valued random variable Î Discrete-valued random variable The random variable is defined to be a function of the outcomes of the random experiment. Example: X = the number of spots on the top face of a die. How to characterize a random variable? Page 1 of 7
16.322 Stochastic Estimation and Control, Fall 2004 Prof vander velde Probability distribution function(or cumulative probability function) F(x)=P(X sx), where x is the argument and X is the random variable name Properties F(-∞)=0 F(∞)=1 0≤F(x)≤1 F(b)≥F(a),ib>a F(x Continuous random variable F(x) Discrete random variable An alternate way to characterize random variables is the probability density functio on: f(x)=“f(x f(x)≥0,x f(x)=F(-∞)+|f(an)d f(u)du Page 2 of 7
16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde Probability distribution function (or cumulative probability function) Fx ( ) = PX ( ≤ x) , where x is the argument and X is the random variable name. Properties: F(−∞) = 0 F( ) 1 ∞ = 0 ≤ F x( ) ≤ 1 Fb ( ) ≥ Fa ( ), if b>a Continuous random variable Discrete random variable An alternate way to characterize random variables is the probability density function: dF x f x( ) = () dx f x( ) 0, ≥ ∀x x f ( ) x = F(−∞) () + f u du ∫ −∞ x = f u du ( ) ∫ −∞ Page 2 of 7
16. 322 Stochastic Estimation and Control. Fall 2004 Prof. VanderⅤelde P(a<X≤b)=P(X≤b)-P(X≤a) F(b-F(a) ∫f(x)ltx-「f(x)hx If(x)dx F(∞)=|f(a)d The density function is always a non-negative function, which integrates over the full ra Consider the probability that an observation lies in a narrow interval between x and x+ imnP(x<X≤x+dx)=lm∫faoh lim f(x)dx This can be used to measure f(x) We see clearly from this that the probability of a random variable having a continuous distribution function taking any prescribed value(dx>0)is zero In the case of a continuous random variable, the probability that it takes any exact value is 0 Also we shall use this relation in setting up problem solutions to indicate the probability of x taking a value in an infinitesimal interval near x f(x)=lim P(x<X<x+Ar) The appropriate range has to be chosen due to the fact that if you make intervals too small you'll have too few samples lying in each interval. The sampling error is too great if the number of samples you get in each interval is too small. If you make the interval too large then the approximation made in the limit is no longer pplicable. Discrete variable Page 3 of 7
16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde P a( < X ≤ b) = PX ( ( ≤ b) − PX ≤ a) = Fb () − Fa ( ) b a f x dx () () − ∫ = f x dx ∫ −∞ −∞ b = f x dx ( ) ∫ a ∞ F( ) () ∞ = ∫ f u du = 1 −∞ The density function is always a non-negative function, which integrates over the full range to 1. Consider the probability that an observation lies in a narrow interval between x and x+dx. x dx + lim P x ( < X ≤ x + dx) = lim f u du ( ) dx→0 dx→0 ∫ x = lim f x dx ( ) dx→0 This can be used to measure f(x). We see clearly from this that the probability of a random variable having a continuous distribution function taking any prescribed value ( dx → 0 ) is zero. In the case of a continuous random variable, the probability that it takes any exact value is 0. Also we shall use this relation in setting up problem solutions to indicate the probability of x taking a value in an infinitesimal interval near x. f x) = lim P x < X ≤ x + ∆x) ( ( ∆ →x 0 ∆x The appropriate range has to be chosen due to the fact that if you make intervals too small you’ll have too few samples lying in each interval. The sampling error is too great if the number of samples you get in each interval is too small. If you make the interval too large then the approximation made in the limit is no longer applicable. Discrete variable Page 3 of 7
16. 322 Stochastic Estimation and Control, Fall 2004 Prof vander velde ▲AA Discrete variable Using the Dirac delta function (x)=0,x≠0 1 8(x)dx=1 f(x) Area=P(X=X The function f(x)=8(x-x) we have f(x)=∑P(X=x)6(x-x) spection The expectation or expected value of a function of a random variable is defined E(x)=xf(x)dx= mean value X >xP(X=x)for a discrete-valued random variable X E[8(x)=∫g(x)(x)dx 28(x,)P(X=x,)for a discrete-valued random variable X Some common expectations which partially characterize a random variable- moments of the distribution Page 4 of 7
16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde Discrete variable Using the Dirac delta function δ () x = 0, x ≠ 0 0+ δ ( ) x dx = 1 ∫ 0− The function f ( ) x = δ ( x x − i) we have f ( ) x = ∑PX ( = ) ( ) i i x δ x x − i Expection The expectation or expected value of a function of a random variable is defined as: ∞ E X( ( ) ) = xf x dx ≡ mean value X ∫ −∞ = ∑xP X ( = xi i ) for a discrete-valued random variable X i ∞ Egx [ ( ( ) ( ) )] = g x f x dx ∫ −∞ = ∑g x P X ( ) ( i = xi) for a discrete-valued random variable X i Some common expectations which partially characterize a random variablemoments of the distribution: Page 4 of 7
16.322 Stochastic Estimation and Control, Fall 2004 Prof vander velde alue E(X)=[x(x)dx=X,deterministic 2nd: Mean squared value E(X2)=「xf(x)x=x These are the first two moments of the distribution. The complete infinite set of moments would completely characterize the random variable We also define central moments(moments about the mean). The first non-zero E[(x-x)]=∫(x-x)f Jxf(x)dx-2xxf(x)dx+X J/( Standard Deviati G=√ Variance x indicates the center of the distribution g indicates the width of the distribution small large The variance of a random variable is the mean squared value of its deviation from its mean. In some sense then, the variance must measure the probability of stated deviations from the mean Page 5 of 7
X 16.322 Stochastic Estimation and Control, Fall 2004 Prof. Vander Velde 1st: Mean or mean value ∞ E X( ( ) ) = xf x dx = X , deterministic ∫ −∞ 2nd: Mean squared value ∞ ( 2 E X ( ) 2 ) = x f x dx = X 2 ∫ −∞ These are the first two moments of the distribution. The complete infinite set of moments would completely characterize the random variable. We also define central moments (moments about the mean). The first non-zero one is: 1st: Variance ∞ ) 2 E X X [( − ) − ( ) 2 ] = ( x X f x dx ∫ −∞ ∞ ∞ ∞ x 2 f x dx − 2 X ∫ () () xf x dx X + ( ) 2 = f x dx ∫ ∫ −∞ −∞ −∞ 2 = X 2 − 2 X + X 2 2 2 = X 2 − X ≡ σ Standard Deviation σ = Variance indicates the center of the distribution σ indicates the width of the distribution The variance of a random variable is the mean squared value of its deviation from its mean. In some sense then, the variance must measure the probability of stated deviations from the mean. Page 5 of 7