Expected value Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.Anti-spam check. Do not fill this in! ===Random variables with density=== Now consider a random variable {{mvar|X}} which has a [[probability density function]] given by a function {{mvar|f}} on the [[real number line]]. This means that the probability of {{mvar|X}} taking on a value in any given [[open interval]] is given by the [[integral]] of {{mvar|f}} over that interval. The expectation of {{mvar|X}} is then given by the integral{{sfnm|1a1=Papoulis|1a2=Pillai|1y=2002|1loc=Section 5-3|2a1=Ross|2y=2019|2loc=Section 2.4.2}} :<math>\operatorname{E}[X] = \int_{-\infty}^\infty x f(x)\, dx.</math> A general and mathematically precise formulation of this definition uses [[measure theory]] and [[Lebesgue integration]], and the corresponding theory of ''absolutely continuous random variables'' is described in the next section. The density functions of many common distributions are [[piecewise continuous]], and as such the theory is often developed in this restricted setting.{{sfnm|1a1=Feller|1y=1971|1loc=Section I.2}} For such functions, it is sufficient to only consider the standard [[Riemann integration]]. Sometimes ''continuous random variables'' are defined as those corresponding to this special class of densities, although the term is used differently by various authors. Analogously to the countably-infinite case above, there are subtleties with this expression due to the infinite region of integration. Such subtleties can be seen concretely if the distribution of {{mvar|X}} is given by the [[Cauchy distribution]] {{math|Cauchy(0, Ο)}}, so that {{math|''f''(''x'') {{=}} (''x''<sup>2</sup> + Ο<sup>2</sup>)<sup>β1</sup>}}. It is straightforward to compute in this case that :<math>\int_a^b xf(x)\,dx=\int_a^b \frac{x}{x^2+\pi^2}\,dx=\frac{1}{2}\ln\frac{b^2+\pi^2}{a^2+\pi^2}.</math> The limit of this expression as {{math|''a'' β ββ}} and {{math|''b'' β β}} does not exist: if the limits are taken so that {{math|''a'' {{=}} β''b''}}, then the limit is zero, while if the constraint {{math|2''a'' {{=}} β''b''}} is taken, then the limit is {{math|ln(2)}}. To avoid such ambiguities, in mathematical textbooks it is common to require that the given integral [[converges absolutely]], with {{math|E[''X'']}} left undefined otherwise.{{sfnm|1a1=Feller|1y=1971|1p=5}} However, measure-theoretic notions as given below can be used to give a systematic definition of {{math|E[''X'']}} for more general random variables {{mvar|X}}. Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Discuss this page