Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.

Similar presentations


Presentation on theme: "Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we."— Presentation transcript:

1 Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we often want to represent outcomes as numbers. A random variable is a function that associates a unique numerical value with every __________ of an experiment. The value of the random variable will vary from trial to trial as the experiment is _____________. A random variable has either an associated probability _________ (discrete random variable) or probability __________ function (continuous random variable).

2 Examples A coin is tossed ten times. The random variable X is the number of tails that are noted. X can only take the values 0, 1,..., 10, so X is a _________ random variable. A light bulb is burned until it burns out. The random variable Y is its lifetime in hours. Y can take any positive ______ value, so Y is a __________ random variable.

3 Discrete Random Variable A discrete random variable is one which may take on only a ___________ number of distinct values such as 0, 1, 2, 3, 4,... Discrete random variables are usually (but not necessarily) counts. If a random variable can take only a ________ number of distinct values, then it must be discrete. Examples of discrete random variables include  the number of children in a family,  the Friday night attendance at a cinema,  the number of patients in a doctor's surgery,  the number of defective light bulbs in a box of ten.

4 Continuous Random Variable A continuous random variable is one which takes an _____________ number of possible values. Continuous random variables are usually ________________. Examples include  height, weight, the amount of sugar in an orange,  the time required to run a mile.

5 Expected Value The expected value (or population mean) of a random variable indicates its _________ or ___________ value.  It is a useful ___________ value (a number) of the variable's distribution. The expected value gives a general ________ of the behaviour of some random variable without giving full details of its probability distribution (if it is discrete) or its probability density function (if it is continuous). The expected value of a random variable X is symbolised by ____ or µ.

6 If X is a discrete random variable with possible values x1, x2, x3,..., xn, and p(xi) denotes P(X = xi), then the expected value of X is defined by: where the elements are summed over all values of the random variable X Example Discrete case : When a die is thrown, each of the possible faces 1, 2, 3, 4, 5, 6 (the xi's) has a probability of 1/6 (the p(xi)'s) of showing. The expected value of the face showing is therefore:  µ = E(X) = (1 x 1/6) + (2 x 1/6) + (3 x 1/6) + (4 x 1/6) + (5 x 1/6) + (6 x 1/6) = 3.5 Notice that, in this case, E(X) is 3.5, which is not a possible value of X.

7 If X is a continuous random variable with probability density function f(x), then the expected value of X is defined by:

8 Variance The (population) variance of a random variable is a non-negative number which gives an idea of how widely _______ the values of the random variable are likely to be;  the larger the variance, the more ____________ the observations on average. Stating the variance gives an impression of how closely ____________ round the expected value the distribution is; it is a measure of the ‘__________' of a distribution about its average value. Variance is symbolised by V(X) or Var(X) or  2 The variance of the random variable X is defined to be: where E(X) is the expected value of the random variable X.

9 Notes the larger the variance, the ________ that individual values of the random variable (observations) tend to be from the mean, on average; the smaller the variance, the _______ that individual values of the random variable (observations) tend to be to the mean, on average; taking the ________ of the variance gives the standard deviation, i.e.: the variance and standard deviation of a random variable are always _______________.

10 Probability Distribution The probability distribution of a discrete random variable is a list of ___________ associated with each of its possible values. It is also sometimes called the probability function or the probability ______ function. More formally, the probability distribution of a discrete random variable X is a function which gives the ____________ that the random variable equals xi, for each value xi:  p(xi) = P(X=xi) It satisfies the following conditions:

11 Probability Density Function The probability density function of a continuous random variable is a function which can be integrated to obtain the probability that the random variable takes a value in a given _________. More formally, the probability density function, f(x), of a continuous random variable X is the _________of the cumulative distribution function F(x):  Since it follows that: 

12 If f(x) is a probability density function then it must obey two conditions:  The total probability for all possible values of the continuous random variable X is 1:  The probability density function can never be ________: f(x) > 0 for all x.

13 Cumulative Distribution Function All random variables (discrete and continuous) have a __________ distribution function. It is a function giving the probability that the random variable X is _____________ x, for every value x. Formally, the cumulative distribution function F(x) is defined to be: for For a discrete random variable, the cumulative distribution function is found by __________ the probabilities as in the example below. For a continuous random variable, the cumulative distribution function is the integral of its probability density function.

14 Example Discrete case : Suppose a random variable X has the following probability distribution p(xi):  Xi 0 1 2 3 4 5  p(xi) 1/32 5/32 10/32 10/32 5/32 1/32 This is actually a binomial distribution: Bi(5, 0.5) or B(5, 0.5). The cumulative distribution function F(x) is then:  Xi 0 1 2 3 4 5  F(xi) 1/32 6/32 16/32 26/32 31/32 32/32 F(x) does not change at intermediate values. For example:  F(1.3) = F(1) = 6/32  F(2.86) = F(2) = 16/32

15 Normal distribution A continuous random variable X, taking all real values in the range [- ,  ] is said to follow a Normal distribution with parameters µ and  if it has probability density function We write  This pdf is a symmetrical, bell-shaped curve, centred at its expected value µ. The variance is  2.

16 Normal Distribution

17 Poisson Distribution Typically, a Poisson random variable is a count of the number of events that occur in a certain ___________ or spatial area. For example, the number of cars passing a fixed point in a 5 minute interval, or the number of calls received by a switchboard during a given period of time. A discrete random variable X is said to follow a Poisson distribution with parameter m, written X ~ Po(m), if it has probability distribution  where  x = 0, 1, 2,..., n  m > 0. The Poisson distribution has expected value E(X) = m and variance V(X) = m; i.e. E(X) = V(X) = m.

18 Poisson Distribution

19 Binomial Distribution Typically, a binomial random variable is the number of _________ in a series of trials, for example, the number of 'heads' occurring when a coin is tossed 50 times. A discrete random variable X is said to follow a Binomial distribution with parameters n and p, written X ~ Bi(n,p) or X ~ B(n,p), if it has probability distribution Typically, a binomial random variable is the number of successes in a series of trials, for example, the number of 'heads' occurring when a coin is tossed 50 times. A discrete random variable X is said to follow a Binomial distribution with parameters n and p, written X ~ Bi(n,p) or X ~ B(n,p), if it has probability distribution where  x = 0, 1, 2,......., n  n = 1, 2, 3,.......  p = success probability; 0 < p < 1 The Binomial distribution has expected value E(X) = np and variance V(X) = np(1-p).

20 Binomial Distribution

21 Exponential Distributions The exponential distributions are a class of continuous probability distribution. They are often used to model the time between events that happen at a ______________________ The probability density function (pdf) of an exponential distribution has the form. where λ > 0 is a parameter of the distribution, often called the rate parameter. The distribution is supported on the interval [0,∞). If a random variable X has this distribution, we write X ~ Exponential(λ). The exponential distributions can alternatively be parameterized by a scale parameter μ = 1/λ.

22 Cumulative distribution function The cumulative distribution function is The mean or expected value of an exponentially distributed random variable X with rate parameter λ is given by In light of the examples give above, this makes sense: if you receive phone calls at an average rate of 2 per hour, then you can expect to wait half an hour for every call. The standard deviation of X is also equal to 1/λ.

23 Memoryless Property An important property of the exponential distribution is that it is _________. This means that if a random variable T is exponentially distributed, its conditional probability obeys  This says that the conditional probability that we need to wait, for example, more than another 10 seconds before the first arrival, given that the first arrival has not yet happened after 30 seconds, is no different from the initial probability that we need to wait more than 10 seconds for the first arrival.

24 Exponential Distribution

25 Random Variate Generation The idea is to solve for x where y is uniformly distributed on (0,1) because it is a cdf. Then x is exponentially distributed. This method can be used for any distribution in theory. But it is particularly useful for random variates that their inverse function can be easily solved.

26 Random Variate Generation Steps Step 1.  Compute the _____ of the desired random variable X.  For the exponential distribution, the cdf is. Step 2.  Set _______ on the range of X.  For the exponential distribution, on the range of X > 0.

27 Step 3.  Solve the equation F(X) = R for X in terms of R.  For the exponential distribution, the solution proceeds as follows.  In practice, since both R and 1-R are uniformly distributed random number, so the calculation can be simplified as

28 Step 4.  Generate (as needed) uniform random numbers R1,R2,… and compute the desired random variates by   In the case of exponential distribution   for i = 1, 2, 3,... where Ri is a __________distributed random number on (0,1).

29 Uniform Distribution The values of a uniform random variable are uniformly distributed over an _________.  For example, if buses arrive at a given bus stop every 15 minutes, and you arrive at the bus stop at a random time, the time you wait for the next bus to arrive could be described by a uniform distribution over the interval from 0 to 15. A discrete random variable X is said to follow a Uniform distribution with parameters a and b, written X ~ Un(a,b), if it has probability distribution  _________________ where  x = 1, 2, 3,......., n. The Uniform distribution has expected value E(X)=________and variance ___________.

30 Uniform Distribution

31 Continuous Uniform Distribution If we want a random variate X uniformly distributed on the interval [a,b], a reasonable guess for generating X is given by X = _____________ where R is uniformly distributed on (0,1).

32 Discrete Uniform Distribution Pdf Cdf Let F(X) = R Solve X in terms of R. Since x is discrete,

33 Empirical Continuous Distributions If the modeler has been unable to find a theoretical distribution that provides a good model for the input data, it may be necessary to use the __________ distribution of the data. A typical way of resolving this difficult is through ``_____________''.

34 Collect empirical data and ____ them accordingly. Tabulate the _______ and __________ frequency. Now assume the value of cumulative frequency as a function of the empirical data, i.e. F(x) = r Establish a relation between x and r using _______ interpolation

35 Steps Generate R Find the interval i in which R lies; that is, find i so that r i < R < r i+1 Compute X by

36 Convolution Method The probability distribution of a ______ of two or more independent random variables is called a convolution of the distributions of the original variables Erlang distribution. an Erlang random variable X with parameters ______ can be shown to be the sum of K independent exponential random variables Xi (i=1,..,k), each having a mean 1/k  An Erlang variate can be generated by


Download ppt "Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we."

Similar presentations


Ads by Google