FIN 410 Week 3 Random Variables
Chapter 3: Random Variables
Overview of Random Variables
Importance: Random variables are crucial for modeling future variables in various fields, such as finance for valuing path-dependent options (e.g., stock prices).
Definition: A random variable can take on multiple values, each with a specific probability for potential outcomes.
Types of Random Variables
Uniformly Distributed Random Variable
Definition: A variable that can take on any value within a certain range with equal probability.
Notation: If $X$ is uniformly distributed between $a$ and $b$, it is denoted as $X ext{ ~ Uniform}(a, b)$.
Special Case: Particularly useful is the uniform distribution defined over the range [0,1].
Infinite numbers exist in this range.
Each point has a probability of occurrence of $0$ due to the infinite distribution, yet the sum of probabilities equals $1$.
Clarification: A probability of $0$ does not imply impossibility.
Properties of Uniform Distribution (0,1)
Density Function: The probability density function for a uniformly distributed random variable is constant at $1$ for $0 < x < 1$.
Cumulative Distribution Function (CDF): For a uniformly distributed random variable on [0,1], the CDF is given by:
F(x) = P(X \leq x) = x \text{ for } 0 < x < 1Expected Value (Mean): The expected value (mean) of $X$ uniformly distributed over [0,1] is:
Transition to Excel Programming
The next step is to program the uniform distribution in Excel using the
RAND()function, which generates a random number between $0$ and $1$.Upon pressing
F9(orFunction + F9on a Mac), the number generated will vary since it is a uniform distribution.Excel will generate different numbers for each user depending on when they refresh the function.
Generating Uniformly Distributed Random Variables in Excel:
In cell T1, type
=RAND().This generates a number uniformly distributed between $0$ and $1$.
Press
F9to refresh and generate a new random number each time.You can hide rows/columns in Excel if too many cells clutter the workspace.
Copying the RAND function down to generate 3,003 uniformly distributed random variables.
Analysis of Random Variables
After generating the random variables, compute the average using
=AVERAGE(...). The result should close to $0.5$ as expected.The standard deviation for a uniform distribution in [0,1] should theoretically be:
It is to be verified in Excel using
=STDEV(...).
Frequency Diagram and Data Distribution in Excel:
Create a frequency table by dividing the interval [0,1] into $10$ equal buckets: $[0, 0.1)$, $[0.1, 0.2)$, …, $[0.9, 1)$.
Use Excel’s
FREQUENCY(...)function to populate each bin.
Convert counts to percentages for easier interpretation, dividing each count by total observations.
Use
$U$3084(a fixed cell reference) to prevent the denominator from changing when copied across bins.
Cumulative Distribution Function: A running total from the frequency table adds up to one as it progresses down the column.
Normal Distribution
Characteristics: Unlike the uniform distribution, the normal distribution spans from $- ext{∞}$ to $+ ext{∞}$, encompassing any real number.
Standard Normal Distribution: Defined specifically where the mean ($ ext{μ}$) is $0$ and the standard deviation ($ ext{σ}$) is $1$.
Critical properties include:
About 67% of observations fall within one standard deviation of the mean.
About 95% within two standard deviations.
About 99.7% within three standard deviations.
Generating Normally Distributed Random Variables in Excel:
Inverse transformation to generate normal distribution: Use
NORM.S.INV(RAND())to create random draws using a uniformly distributed random variable.This replaces the random values of the uniform distribution with those of the standard normal distribution which may produce a wide range of numbers around the mean ($ ext{μ} = 0$).
Validate the distribution by checking that the average value approaches $0$ and the standard deviation approaches $1$.
Frequency and Cumulative Distribution in Normal Distribution:
Create frequency tables similar to those in the uniform distribution,
However, use bins spread across the range $(-3,3)$ due to the nature of normal distribution covering all real numbers.
Similar function to generate cumulative and density functions in Excel using
NORM.DIST(...)for respective probabilities.Compare the theoretical density function against empirical data to assess accuracy and robustness of the Excel random number generation.
Conclusion
By utilizing Excel, students can visualize and understand random distributions effectively, enhancing their comprehension of statistical concepts related to probability and distributions.