Vous êtes sur la page 1sur 83

Probability, Statistics and Queuing Theory

Session 3
- Prof. D. K. Jaiswal

Agenda
Random variable Probability mass function Probability density function Properties

Random variable

Random variable
Example: Three RAM chips were examined and detected them as nondefective (N) or defective (D). The possible outcomes are defined as, X = No. of defective RAM chips

Random variable

Random variable

Random variable

Random variable

Random variable

Random variable
With the introduction of X we can write the probabilities as p(0) = P(X=0) = 1/8 p(1) = P(X=1) = 3/8 p(2) = P(X=2) = 3/8 p(3) = P(X=3) = 1/8 which is such that p(0) + p(1) + p(2) + p(3) =1 and each p(i) 0, i = 0, 1, 2, 3

Random variable
p(0) = P(X=0) = 1/8 p(1) = P(X=1) = 3/8 p(2) = P(X=2) = 3/8 p(3) = P(X=3) = 1/8 The values assumed by the random variable X above are discrete and hence, it is of the form p(x)=P(X=x), which is called the probability mass function (pmf). Observe that
(i) p(0) + p(1) + p(2) + p(3) =1 (ii) p(i) 0, i = 1, 2, 3, 4

Random variable
Random variable:
A random variable is a real valued function which is a mapping from the sample space to the set of real numbers, i.e., X: ->R. In other words it associates a real number with each element in the sample space.

Random variable
A random variable is a function or rule that assigns a number to each outcome of an experiment. Basically it is just a symbol that represents the outcome of an experiment. X = number of heads when the experiment is flipping a coin 20 times. C = the daily change in a stock price. R = the number of miles per gallon you get on your auto during a family vacation. Y = the amount of medication in a blood pressure pill. V = the speed of an auto registered on a radar detector used on I-20

Random variable
Types of Random variable:

Discrete random variable Continuous random variable

Random variable
Discrete Random Variable It counts data that takes on a countable number of values .This means you can sit down and list all possible outcomes without missing any, although it might take you an infinite amount of time. A random variable is said to be discrete if it assumes only a finite or countably infinite values of X, that is the range space R contains a finite or countably infinite points. The possible values of x may be listed as x1, x2 . X = values on the roll of two dice: X has to be either 2, 3, 4, , or 12. Y = number of accidents on a busy road during a week: Y has to be 0, 1, 2, 3, 4, 5, 6, 7, 8, real big number

Solution 1: What possible values can X take on? X {3, 2, 1, 0,1,2,3}. Solution 2: What are the respective probabilities?

Similarly, P{X=2}= P{X=-2}= 15/165

Probability Mass Function

Probability Mass Function


Probability Mass Function :
A random variable is called discrete when it assumes discrete observations or whole numbers. The probability that a random variable X assumes different discrete values x is denoted by p(x)=P(X=x), called probability mass function (pmf).

Probability Mass Function


That is, p(x)=P(X=x) is called a (discrete) probability distribution, because, a total probability of one of a random experiment is divided into different events. Hence, the following are the properties of P(X=x)

Probability Mass Function

Probability Mass Function

Probability Mass Function


Developing Discrete Probability Distributions

Probability distributions can be estimated from relative frequencies. Consider the discrete (countable) number of televisions per household (X) from India survey data

Probability Mass Function


E.g. what is the probability there is at least one television but no more than three in any given household?

at least one television but no more than three P(1 X 3) = P(1) + P(2) + P(3) = .319 + .374 + .191 = 0.884

Probability Mass Function


Define, X = No. of defective RAM chips Assume that probability of getting a defective chip is 0.15

Probability Mass Function

Probability Mass Function

Probability Mass Function


Example 2: Let X denote the random variable that is defined as the sum of two fair dice, then,

Probability Mass Function

Mathematical expectation

Mathematical expectation
If X is a discrete random variable which can assume any of the values x1, x2, x3, ,xn, with respective probabilities p(xi) = P(X=xi), i=1, 2, 3, , n, then the expected value of X is defined as

Mathematical expectation
On the other hand if X can take any one of the values xi, i=1, 2, 3, with respective probabilities p(xi) = P(X=xi), i=1, 2, 3, , then the expected value of X is defined as

Mathematical expectation
Example: Find the expected value of X in the following probability distribution:

Mathematical expectation

Mathematical expectation
Solution:

Mathematical expectation
Solution: Since P(1) = P(A) and P(0) = 1- P(A) , then E[I]= P(A)

Mathematical expectation

Random variable

Mathematical expectation
Solution:

P { X= 36} = 36/120
P { X=40} = 40/120 P {X=44} = 44/120 Hence , E[X]= 36*(3/10)+40*(1/3)+44*(11/30 = 1208/30 = 40.2667 Also Average no. of student in bus = 120/3 = 40

Mathematical expectation
0.3

Mathematical expectation

Mathematical expectation
Addition theorem on expectation:
The mathematical expectation of sum of the random variables is equal to the sum of their expectations, provided all the expectations exist. i.e., E{xi} = {E(xi)}

Mathematical expectation

Mathematical expectation
Example: Calculate Var(X) if X represents the outcome when a fair die is rolled.
Solution: E[X] = 7/2 E[X]= 1*(1/6)+2*(1/6)+3*(1/6)+4*(1/6)+5*(1/6)+6*(1/6) = (1/6) * 91 Thus Var (X) = 91/6 (7/2) = 35/12

Mathematical expectation

Mathematical expectation

Exercise
If the random variable X takes the values 1,2,3 and 4 such that 2P(X=1)=3P(X=2)=P(X=3)=5P(X=4). Find the probability distribution function of X.

Continuous Random Variable

Continuous Random Variable


Continuous Random Variable: Measurement of data [time, weight, distance, etc] ,one that takes on an uncountable number of values this means you can never list all possible outcomes even if you had an infinite amount of time. A random variable X is called a continuous random variable if X takes all its possible values of an interval (or) equivalently. If the range space Rx of the random variable X is an interval or a collection of intervals, X is called continuous random variable. X = time it takes you to drive home from class: X > 0, might be 30.1 minutes measured to the nearest tenth but in reality the actual time is 30.10000001minutes?)

Continuous Random Variable


Continuous Probability Distributions::
A continuous random variable can assume any value in an interval on the real line or in a collection of intervals. It is not possible to talk about the probability of the random variable assuming a particular value. Instead, we talk about the probability of the random variable assuming a value within a given interval.

Continuous Random Variable


Continuous Probability Distributions ::
The probability of the continuous random variable assuming a specific value is 0. The probability of the random variable assuming a value within some given interval from x1 to x2 is defined to be the area under the graph of the probability density function between x1 and x2.

Continuous Random Variable

Continuous Random Variable


Continuous random variable:
A random variable is called continuous when it assumes values in a given interval. The probability that a random variable X assumes different values x in a given interval, say (a, b), is denoted by f(x) = P(a X b), called probability density function (pdf).

Continuous Random Variable


Indeed, the probabilities are the area under the curve in a given interval. Thus, a function with values f(x) defined over the set of all real numbers (a, b) is given by

Continuous Random Variable

Continuous Random Variable


It is important to note that f(c), the value of the pdf of X at a constant c does not give P(X=c) as in the discrete case and in continuous case probabilities are always associated with intervals and P(X=c) = 0, i.e.,

Probability Density Function

Probability Density Function

A f(x) is called a probability density function of a continuous random variable if it satisfy the following conditions:

Cumulative distribution function


The cumulative distribution function F(x) for a discrete random variable X whose probability mass function is given by:

Cumulative distribution function


Example 3: Given p(0) = 1/16, p(1) = 4/16, p(2) = 6/16, p(3) = 4/16, p(4) = 1/16. Find the distribution function of p(x) Solution: F(0) = p(0) = 1/16 F(1) = p(0) + p(1) = 5/16 F(2) = p(0) + p(1) + p(2) = 11/16 F(3) = p(0) + p(1) + p(2) + p(3) = 15/16 F(4) = p(0) + p(1) + p(2) + p(3) + p(4) = 1

Cumulative distribution function

Cumulative distribution function

Cumulative distribution function

Cumulative distribution function

Cumulative distribution function

Cumulative distribution function

From the above plot the only points that receive nonzero probability are -2, 0, and 2. Because P(Xx) = 0 for any x less than -2, p(-2) = P(X=-2) = 0.2 Similarly, p(0) = P(X=0) = 0.7 0.2= 0.5 p(2) = P(X=2) = 1.0 0.7 = 0.3

Cumulative distribution function


If X is a continuous random variable and a and b are real constants with a b, then P(a X b) = P(a X<b) = P(a< X b) = P(a<X<b)

Exercise

Answer
C=1/9

Exercise
The diameter of an electric cable X is a continuous RV with pdf f(x) = kx(1 -x), 0=X=1. Find i)the value of k, ii)cdf of X, iii) the value of a such that P(X<a) = 2P(X>a).

Answer
i) k =6

ii) Therefore cdf is given by 0, x 0 F(x) = 3x 2x, 0 x 1 1, x 1.


iii)

Exercise

i) Find the value of K ii) Find P(X<3), P(X 3), P(0<X<4) iii) Find the distribution function of X.

Answer

i) K = 1/25 ii) 9/25, 16/25, 3/5, iii)F(0)= 1/25, F(1)= 4/25, F(2)= 9/25, F(3)= 16/25, F(4)= 1

Cumulative distribution function


Example:

Cumulative distribution function


If X is a continuous random variable and the value of its probability density at t is f(t), then function is given by:

The properties discussed in discrete case will hold good here also.

Cumulative distribution function

This theorem states that pdf is the derivative of the cumulative distribution function (df)

Cumulative distribution function

Cumulative distribution function

Cumulative distribution function

Cumulative distribution function

Exercise

Mathematical expectation of continuous random variable: