Continuous Random Variable: Difference between revisions

From Rice Wiki
No edit summary
Line 199: Line 199:


<math>
<math>
f(y) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{1}{2} z^2
f(y) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{1}{2} z^2}
</math>
</math>



Revision as of 06:04, 2 March 2024

Continuous random variables have an inifinite number of values for any given interval. While similar, the approach to analysis is very different from discrete variables

  • Summation becomes integration
  • Probability becomes area under a curve

Probability Distribution Function Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x) }

The probability density function (pdf) maps a continuous variable to a probability density.

As the name "density" suggests, the area under the pdf curve between a range is the probability of the variable being in that range.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(c \leq x \leq d) = \int_c^d f(x) dx = F(d) - F(c) }


Total area under the curve must be Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 1 } , as chances of events happening is 100% if the range includes all possible events.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_{-\infty}^\infty f(x) dx = 1 }

There is no area under a single point

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(X = a) = 0 }

Mean and Variance

The mean and variance calculations are pretty much the same as that of discrete random variables, except the summations are swapped out for integrals.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle E(X) = \mu_X = \int_{-\infty}^\infty x f(x) dx }

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Var(X) = \sigma^2_X = \int_{-\infty}^\infty (x - \mu_X)^2 f(x) dx = \int_{-\infty}^\infty x^2 f(x) dx - \mu_X^2 }

Median and Percentile

The a-th percentileis the point at which a percent the area under the curve is to one side. You want Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(X \leq x) } to be a%, the calculation of which is in the page above.

By the same logic, the quartiles are at 25%, 50%, and 75% accordingly.

Uniform Distribution Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X \sim Uniform(a, b) }

Uniform random variable is described by two parameters: Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle a } is minimum, and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle b } is maximum. It has a rectangular distribution, where every point has the same probability density.

PDF

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x) = \begin{cases} \frac{ 1 }{ b - a } & a \leq x \leq b \\ 0 & \text{otherwise} \end{cases} }

CDF

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle F(x) = \begin{cases} 0 & x < a \\ \frac{ x - a }{ b - a } & a \leq x \leq b \\ 1 & x > b \end{cases} }

Mean

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu_X = \frac{ a + b }{ 2 } }

Variance

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sigma^2 = \frac{ 1 }{ 12 } (b - a)^2 }

Exponential Distribution Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X \sim Exp(\lambda)}

The exponential distribution models events that occurs

  • Continuously
  • Independently
  • At a constant average rate

It takes in one parameter: Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \lambda} , the rate parameter. It is defined by the mean below.

Exponential distribution has the memoryless property: the probability to an event does not change no matter how much time has passed.

In probability terms, the probability that we must wait an additional Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle t} units given that we have waited Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle s} units

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(T > t + s | T > s) = P(T > t) = e^{-\lambda t} }

Notably, it models time until some event has happened.

PDF

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x) = \begin{cases} \lambda e ^{ - \lambda x } & a \leq x \leq b \\ 0 & \text{otherwise} \end{cases} }

CDF

Mean

Integration by parts

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu_X = \frac{1}{\lambda} }

Variance

Integration by parts

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \sigma^2 = \frac{ 1 }{ \lambda^2 } }

Exponential and Poisson

Exponential distribution and poisson RVs are related:

  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X \sim Poisson(\lambda)} : the number of events in a unit time
  • Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X \sim Exp(\lambda)} : waiting time until an event

Normal Random Variable

Normal random variables are the most widly used continuous RV in statistics, characterizing many natural phenomenons. It is the famous bell curve.

They are characterized by two parameters: mean and variance.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Y \sim N(\mu_Y, \sigma^2_Y) }

Normal random variables are perfectly symmetric at the mean.

Standardizing Normal Distribution

Standardization of a data means to make its mean 0 and its standard deviation 1. We do this by subtracting the mean and dividing by the standard deviation:

Intuitively, this moves the dataset and changes the scale. We do this to simplify probability calculations.

Z score

The z-score is the number of standard deviations above or below the mean. A positive z score is above, and a negative is below.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle z = \frac{y - \mu}{\sigma} }

PDF

The pdf for normal random variable is the following.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(y) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{1}{2} \frac{(y - \mu)^2}{\sigma^2}} }

After standardizing the normal RV, we can use the following instead.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(y) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{1}{2} z^2} }

where Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle z} is the z-score covered in the last section.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(z) = \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2} z^2} }

CDF

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle F(y) = 1 - e^{- \lambda y} }