Probability and Stochastic Processes
Probability and Stochastic Processes
Course Contents
1. Introduction to probability and random variables
2. Discrete probability distributions
3. Continuous probability distributions
4. Parameter estimation and Hypothesis testing
5. Stochastic processes
6. Markov chains
Course Objectives
Introduction to the logic of probability
Develop intuition of how probability to practical situation
Apply probability theory to engineering problems
Probability
How likely something is to happen.
Many events can't be predicted with total certainty. The best we can say is
how likely they are to happen, using the idea of probability.
Tossing a Coin
heads (H) or
tails (T)
Throwing Dice
Probability
In general:
Number of ways it can happen: 1 (there is only 1 face with a "4" on it)
Probability Line
Probability does not tell us exactly what will happen, it is just a guide
Example: toss a coin 100 times, how many Heads will come up?
But when we actually try it we might get 48 heads, or 55 heads ... or anything
really, but in most cases it will be a number near 50.
Words
Tossing a coin, throwing dice, seeing what pizza people choose are all examples
of experiments.
Example Events:
The Event Alex is looking for is a "double", where both dice have the same
number. It is made up of these 6 Sample Points:
Experiment Is it a Double?
{3,4} No
{5,1} No
{2,2} Yes
{6,3} No
... ...
After 100 Experiments, Alex has 19 "double" Events ... is that close to what
you would expect?
Probability: Complement
Complement of an Event: All outcomes that are NOT the event.
So the Complement of an event is all the other outcomes (not the ones we
want).
And together the Event and its Complement make all possible outcomes.
Probability
Probability of an event happening = Number of ways it can happen/Total
number of outcomes
Number of ways it can happen: 1 (there is only 1 face with a "4" on it)
Total number of outcomes: 6 (there are 6 faces altogether)
So the probability = 16
The complement is shown by a little mark after the letter such as A' (or
sometimes Ac or A):
P(A) + P(A') = 1
Event A is {5, 6}
It makes sense, right? Event A plus all outcomes that are not Event A make
up all possible outcomes.
Example. Throw two dice. What is the probability the two scores
are different?
Different scores are like getting a 2 and 3, or a 6 and 1. It is quite a long list:
P(A) = 1 P(A')
= 1 1/6
= 5/6
So in this case (and many others) it's easier to work out P(A') first, then find
P(A)
Random Variables
A Random Variable is a set of possible values from a random experiment.
Let's give them the values Heads=0 and Tails=1 and we have a Random
Variable "X":
In short:
X = {0, 1}
So:
Example: x + 2 = 6
X could be 0, 1, 2, or 3 randomly.
Capital Letters
We use a capital letter, like X or Y, to avoid confusion with the Algebra type of
variable.
Sample Space
A Random Variable's set of values is the Sample Space.
X could be 1, 2, 3, 4, 5 or 6
Probability
We can show the probability of any one value using this style:
X = {1, 2, 3, 4, 5, 6}
In this case they are all equally likely, so the probability of any one is 1/6
P(X = 1) = 1/6
P(X = 2) = 1/6
P(X = 3) = 1/6
P(X = 4) = 1/6
P(X = 5) = 1/6
P(X = 6) = 1/6
In this case, there could be 0 Heads (if all the coins land Tails up), 1 Head, 2
Heads or 3 Heads.
But this time the outcomes are NOT all equally likely.
X = "number
of Heads"
HHH 3
HHT 2
HTH 2
HTT 1
THH 2
THT 1
TTH 1
TTT 0
Looking at the table we see just 1 case of Three Heads, but 3 cases of Two
Heads, 3 cases of One Head, and 1 case of Zero Heads. So:
P(X = 3) = 1/8
P(X = 2) = 3/8
P(X = 1) = 3/8
P(X = 0) = 1/8
Example: Two dice are tossed.
The Random Variable is X = "The sum of the scores on the two dice".
1st Die
1 2 3 4 5 6
1 2 3 4 5 6 7
2nd
Die 2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
Let's count how often each value occurs, and work out the probabilities:
A Range of Values
We could also calculate the probability that a Random Variable takes on a range
of values.
Solving
We can also solve a Random Variable equation.
X is the Random Variable "The sum of the scores on the two dice".
x is a value that X can take.
Continuous
Random Variables can be either Discrete or Continuous :
Summary
A Random Variable is a set of possible values from a random experiment.
Random Variables:
Mean, Variance and
Standard Deviation
A Random Variable is a set of possible values from a random experiment.
Let's give them the values Heads=0 and Tails=1 and we have a Random
Variable "X":
So:
1 2 3 4 5 6
0.1 0.1 0.1 0.1 0.1 0.5
When we know the probability p of every value x we can calculate the Expected
Value (Mean) of X:
= xp
Example continued:
x 1 2 3 4 5 6
p 0.1 0.1 0.1 0.1 0.1 0.5
xp 0.1 0.2 0.3 0.4 0.5 3
= xp = 0.1+0.2+0.3+0.4+0.5+3 = 4.5
Note: this is a weighted mean : values with higher probability have higher
contribution to the mean.
Variance: Var(X)
Var(X) = x2p 2
Example continued:
x 1 2 3 4 5 6
p 0.1 0.1 0.1 0.1 0.1 0.5
x2p 0.1 0.4 0.9 1.6 2.5 18
Standard Deviation:
= Var(X)
Example continued:
x 1 2 3 4 5 6
p 0.1 0.1 0.1 0.1 0.1 0.5
x 2p 0.1 0.4 0.9 1.6 2.5 18
(Note that we run the table downwards instead of along this time.)
Using that as probabilities for your new restaurant's profit, what is the
Expected Value and Standard Deviation?
= xp = 25
= $25,000
= $56,000
So you might expect to make $25,000, but with a very wide deviation possible.
Let's try that again, but with a much higher probability for $50,000:
Example (continued):
Now with different probabilities (the $50,000 value has a high probability
of 0.7 now):
= xp = 45
In thousands of dollars:
= $45,000
= $47,000
And the standard deviation is a little smaller (showing that the values are more
central.)
Continuous
Random Variables can be either Discrete or Continuous :
Here we looked only at discrete data, as finding the Mean, Variance and
Standard Deviation of continuous data needs Integration .
Summary
A Random Variable is a variable whose possible values are numerical
outcomes of a random experiment.