Role of Variables in Finance
Over the past fifty years, researchers have made significant progress in understanding how random variables underlie many of the events that shape our world. The development of information theory by Claude E. Shannon and others created a basic framework to describe how, for example, an investor might interpret new information. For trading decisions, his original ideas still form the foundation of many methodologies.
However, an investor's decisions also depend on the future price of a security or market index and the price distributions and volatilities driving those prices. How might this information be encoded? What is the best way to think about these variables? What statistical methods can we use to understand them? The answers to these questions form the subject of this blog post.
What is a random variable?
The random variable that most people living in modern times encounter is the stock price. If you listen to business news, read a newspaper or watch CNBC, you will probably hear frequently about how a company's stock price has gone up or down. That variability – the ups and downs – is why we call them "random variables."
A random variable is simply a function that maps an outcome's probability distribution to its associated value. The probability distribution gives the possible values of the variable along with their probabilities. For example, suppose you are playing roulette in Las Vegas, where there are 38 slots on the wheel, numbered from 1 to 36 plus 0 and 00 for the 0 and 00 slots in the middle of the wheel. According to the rules of roulette, you win if your wager is on a number that is spun or on an even-money bet when 0 comes up.
When playing at most casinos, you can choose which number to bet on. If you were to spin the wheel 36 times and keep track of whether you'd won or lost, you could then define a random variable X that maps to the set {1, …, 36}. If it happened that you just bet on number 19 and number 19 was spun each time, your results would be:
X={1,2,3,...36} → {{}, {}, {}, ..., {1}}
X={19} → {{}, {"lost"}, {"lost"}, ,..., {}
The random variable X is called a discrete random variable because its possible values are integers. If you wanted to play roulette in dollars rather than in numbers, you could write the function that mapped probability distributions to values as a function. Since this would be equally likely to return any number between 0 and 36, the function might look like this:
X:{0,1,...36} → {$0 , $1 , $2 ... $36}
Here's an example of how you could use X with this map. If you bet $5 on number 19 and lost, the associated value would be:
X:{0,1,...36} → {$0 , $1 , $2 ... $36} →{.$05}
This random variable is called a continuous random variable because its possible values are real numbers. Many times in finance we encounter both discrete and continuous random variables.
The Use of Probability And Cumulative Distribution Functions
The probability and cumulative distribution functions help us define discrete and continuous random variables is an important component of modern finance.
We can use our understanding of probability and cumulative distribution functions (PDF and CDF) to map the possible outcomes of a security or market index into numerical values that we can use for trading decisions. One option might be to choose one number to represent the outcome of a security. For example, if the Dow Jones Industrial Average closes at 10,100 on Monday, we might assign that number to our random variable X. If it closes at 10,300 on Tuesday, we'd give the random variable X another value.
The Determination of Expected Values of Functions
Expected value (or mean or mathematical expectation) is a function that maps outcomes to their expected values. If we assign X the random variable above with possible values of 10,100 and 10,300, we get:
E(X)=10,200
This says that no matter which number you choose to represent an outcome associated with X, the expected value of X is 10,200.
The Determination of Standard Deviation
Standard deviation is a function that maps outcomes to their standard deviations. For discrete random variables, we can calculate standard deviation as follows:
SD(X) = sqrt((E(X)-x^2)/n))
Here, x is the random variable's value and n is the number of outcomes.
For our example, let's say that the Dow Jones Industrial Average closes at 10,100 on Monday and 10,300 on Tuesday. The expected value of X would be 10,200 according to above equation:
E(X)=10,200
SD(X) = sqrt((10,200-10,100^2)/2)=sqrt((100^2/4)-(100^2/4))=sqrt(1) = 1
The Determination of Correlation
We can use probability and cumulative distribution functions in finance in calculations involving the relationship between two random variables. Correlation is a numerical measure of the relationship between two random variables. It has values that go from -1 to +1. If the correlation is positive, an increase in one variable tends to be associated with an increase in the other. If it's negative, an increase in one variable tends to be associated with a decrease in the other.
Calculation of Variance
The variance is a function that maps outcomes to their variances. For discrete random variables, we can calculate the variance as follows:
V(X) = E((X-E(X))^2)
Here, x is the random variable's value and n is the number of outcomes. For our example, let's say that the Dow Jones Industrial Average closes at 10,100 on Monday and 10,300 on Tuesday. The expected value of X would be 10,200 according to the above equation:
E((X-10,200)^2)= E(X^2)-10,400= 100^2/4-10000=50^2/4-10000=250-10000=-750
V(X) = E((-750)^2)= 752.5
What is Normal Distribution? What Purpose Does it Serve?
The normal distribution and standard percentiles (quartiles), as well as gamma, exponential, and Weibull distributions are important tools in analyzing random variables
The normal distribution is a simple probability model that has been used to describe prices and returns of a large number of securities across many markets. In addition, the standard percentiles (quartiles) are used as rules of thumb by some traders for defining buy and sell decisions.
Gamma Random Variables
The gamma random variable has positive integers as support and can be used to model lifetimes or other events that are distributed exponentially, but where the rate at which events occur is itself changing over time (for example, in an M/G/1 queue). The probability density function (PDF) for the gamma distribution is given by:
f(x;alpha,beta) = {n/sigma alpha exp(-rx)/B(sigma alpha, x)} for x > 0
Gamma distributes a continuous random variable and is often used as the conjugate prior in Bayesian probability analysis of log-normal models. That is, one can think of a log-normal continuous random variable as a gamma distributed, with the interpretation of the positive "x" in the density function above being an exponential factor.
Weibull Random Variables
A Weibull random variable has positive integers as support and can be used to model lifetimes or other events that are distributed exponentially, but where the rate at which events occur is itself changing over time (for example, in an M/G/1 queue). The probability density function (PDF) for the Weibull distribution is given by:
f(x; alpha,beta) = {alpha/beta exp(-ax) for x > 0 }
Joint Probability Distributions
The joint probability distribution for two variables is the table that shows all the possible outcomes of both variables. There are different names for tables with different numbers of variables. For example, a bivariate distribution is one with two random variables and a trivariate distribution contains three random variables.
Random Samples
A random sample is a subset of the population selected in such a way that every element in the population has a nonzero chance of being selected.
Univariate Samples
A univariate distribution is one with only one random variable.
Multivariate Samples
A multivariate distribution is one with two or more random variables.
Expected Values
The expected value of X, symbolized by E(X), is the weighted average of all possible values of X. The weights used are the probabilities associated with each outcome. For example, if you flip a fair coin, there is one chance of getting heads and one chance of getting tails.
Covariance
The covariance matrix is used to measure the strength of association between two random variables.
Correlation
A correlation coefficient is used to describe the relationship between two random variables.
Standard Deviation, Variance Review Binomial, Hypergeometric, and Poisson.
The standard deviation is the square root of the variance. The standard deviation describes how widely dispersed a set of numbers is around their mean value.
If X represents one quantity and Y another, then the variance of X is given by and the standard deviation is simply σ = √(Var(X)).
The variance is a measure of how widely spread out numbers are from their mean. The larger the standard deviation is, the more spread apart the data will tend to be from the expected value.
Poisson distribution can be used to describe discrete events that occur randomly in time or space. It does not make any assumptions about the underlying distribution of the number of events. The Poisson distribution is used to determine how many times an event occurs in an interval or space. The basic equation for the Poisson distribution is e^(-λ).
The basic assumption behind hypergeometric distributions is that there are N objects (people, cars, balls, or whatever), of which M are in one category (selected) and N-M are in the other.
Conclusion
There you have it - the role of random variables in finance! To sum it all up, random variables are an essential part of computational finance. They help to model the randomness in market prices, interest rates, dividends, and all other financial variables. Modeling these price changes is important not only in current assets like stocks and bonds but also for future liabilities like pensions.