Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random variables (r.v.) Random variable

Similar presentations


Presentation on theme: "Random variables (r.v.) Random variable"— Presentation transcript:

1 Random variables (r.v.) Random variable
Definition: a variable that takes on various values in a random way Examples Number of items to check out at super-market Discrete (takes on a countable number of values) End-to-end delay in a communication network Continuous ([propagation delay; +infinity]) Described thru Probability mass function (pmf) Probability density function (pdf)

2 Probability distribution functions
The behavior of a Discrete random variable is captured by a probability mass function Example: # items to check out at super-market (X) P[X = i] and i = 1, 2, . . ., 200 (a certain upper bound) of a continuous random variable is captured by a probability density function Example: End-to-end delay in a communication network (D) fD(d)

3 Probability theory Origin Experiments Example 1 Outcome Toss a coin
3 times Possible r.v. X = # of heads A discrete r.v. Outcome H H H H H T H T H H T T T H H T H T T T H T T T H T Sample space 1/2 H T H T H T

4 Example 1 continued What is the probability distribution of X?
Sample space X {0,1,2,3} What is the probability distribution of X? Building on the following observation P(X = i) = # of feasible sample points / total # of sample points P(X=0) = 1/8; P(X=1) = 3/8 P(X=2) = 3/8; P(X=3) = 1/8

5 Example 2: cost functions
X = cost_function (sample points) Example If heads appears you make 10 $ If tail appears you pay 5 $ X = amount of money you make => X = {-15, 0, 15, 30} (discrete r.v.)

6 Example 3: continuous r.v.
End to end delay in a communication network X Continuous random variable belongs to a state space Lower bound = propagation delay Upper bound = +infinity

7 Discrete random variables: probability mass functions
Classified according to their probability mass function I will cover Binomial distribution Geometric distribution Poisson distribution

8 Binomial distribution
is primarily associated with the tossing of a coin A certain number of independent trials Outcome #1 (or 1) with probability p (referred to as success) Outcome#2 (or 2) with probability 1-p (referred to as failure) Example: n trials (n=6) What is the probability that the following sequence arises? 1, 2, 1, 2, 1, 2 Answer: Prob = p (1-p) p (1-p) p (1-p) = p3(1-p)3

9 Binomial random variable
Suppose n independent trials resulting in a “success” with probability p And in a “failure” with probability (1-p) If X represents the number of successes in the n trials => X is a binomial random variable with parameters (n, p)

10 Binomial distribution: example1
Four fair coins are flipped. What is the probability that two heads and two tails are obtained? Solution Let X equal the number of heads (successes) => X is a binomial r.v. with parameter (n=4, p=1/2)

11 Binomial distribution: example2
It is known that any item produced by a certain machine will be defective with probability 0.1, independent of any other item. What is the probability that in A sample of three items At most one will be defective?

12 Geometric random variable
Experiment n trials Each having probability p of being a success Are performed until a success occurs If X is the number of trials required until the first success X is a geometric r.v. with parameter p Its probability mass function is

13 Geometric r.v.: application
Time sharing Jobs running on a computer gets queued in order to use the CPU A quantum of time is assigned to each process X: Represents how many times a job cycles around => is a geometric r.v. 6 tosses of a coin The first outcome is Heads How many more heads do I need before I get a tail?

14 Poisson distribution Poisson distribution is
Associated with the observation of event occurrences If N represents the number of events in T => N/T = average number of events /minute interested in answering the following question How many occurrences of this event take place per minute? The way it has been done Either 0 or 1 event occurrence per minute T=15 min Event#1 Time

15 Poisson distributed random variable
A Poisson random variable X Characterizes the number of occurrences of an event Typically an arrival => X = # arrivals per unit time With parameter λ (average # of arrivals per unit time) The value of λ (arrival rate)

16 Poisson distribution: example 1
If number of accidents occurring on a highway per day is a Poisson r.v. with parameter λ = 3, What is the probability that no accidents occur today? Solution

17 Poisson distribution: example 2
Consider an experiment that counts the number of α-particles emitted in a one-second interval by one gram of radioactive material. If we know that ,on average , 3.2 such α-particles are given off what is a good approximation to the probability that no more than 2 α-particles appear?

18 Binomial approximation to the Poisson distribution
N events T Time ΔT Divide the time axis into ΔT small enough so that At most only one arrival can occur n ΔTs are required It is like creating a binomial experiment Each ΔT is a trial Outcome: 0 arrivals (p ?) or 1 arrival ((1-p)?)

19 Binomial approximation to the Poisson distribution (cont’d)
With what probability we are going to have 1 arrival or 0 arrivals in one ΔT ? Average arrival rate per ΔT interval As such

20 Binomial approximation to the Poisson distribution (cont’d)
If you let n tends to infinity you will get

21 Cumulative distribution
Consider a discrete r.v. X Taking on the values from 0 to infinity The cumulative distribution function can be expressed F (j) = P(X <= j) = P(X=0) P(X=j-1) + P(X=j) For instance Suppose X has a probability mass function given by P(1) = ½, P(2) = 1/3, P(3) = 1/6 The cumulative function F of X is given by

22 Residual distribution
Given by

23 Expectation of a discrete random variable
X is a discrete random variable Having a probability mass function p(X) => Expected value of X is defined by E[X] as Variance of X a and b are constants

24 Expectation: example 1 Find E[X] Find Var(X)
where X is the outcome when we roll a fair dice Find Var(X) when X represent the outcome when we roll a fair dice

25 Expectation: example 2 Calculate E[X] when X is Binomially distributed
With parameters n and p

26 Expectation: example 3 Find E[X]
Of a geometric random variable X with parameter p

27 Expectation: example 4 Calculate E[X]
For Poisson random variable X with parameter λ


Download ppt "Random variables (r.v.) Random variable"

Similar presentations


Ads by Google