Docsity

Random Variables - Data Analysis I - Lecture Notes | STAT 528, Study notes of Statistics

Partial preview of the text

Download Random Variables - Data Analysis I - Lecture Notes | STAT 528 and more Study notes Statistics in PDF only on Docsity!

Stat 528 (Autumn 2008) Random Variables

Reading: Sections 4.3, 4.4.

  • Random variables (RVs)
    • Discrete and continuous RVs
  • The mean of a RV
    • The mean of discrete RV
    • The mean of some continuous RVs
    • Transformations
    • Rules for means
  • The variance and standard deviation of a RV
    • Rules for variances

Random variables

  • A random variable (RV), X, is a numerical variable that depends on the outcome of a chance experiment (a random phenomenon).
  • We can have discrete or continuous RVs.
  • Examples:
    • Number of heads in three coin flips.
    • Height of students selected at random from the stat 528 class.
    • In a random sample of components, the number that pass a test.
    • Number of particles counted by a Geiger counter in a radiation experiment.

Examples

  • Telephone calls. Suppose that the length X of an inter- national telephone call, to the nearest minute, is given by

value of X 1 2 3 4 probability 0.2 0.5 0.2 0. Calculate the following.

  1. P (X ≤ 2) =
  2. P (X < 2) =
  3. P (X ≥ 1) =
  • Random walk. A fly leaves a restaurant. Every minute thereafter the fly randomly moves either 1 meter left (-1) with probability 0.5 or 1 meter right (+1) with probability 0.5. Let the RV X denote the distance the fly moves left or right in three minutes, relative to his start position. What is the probability distribution of X?

Continuous random variables

  • A continuous RV, X takes values x anywhere in an inter- val of values.
  • Example: X is the direction of a spinner. X can take on any value in the range 0o^ to 360o.
  • Probability distributions for continuous RVs are de- scribed by the probability density curve. 1. The density curve always has non-negative height. 2. The area under the density curve is one. (Compare with the probability distribution for discrete RVs).
  • Probabilities are given by the area under the curve.
  • For any one value x of X, P (X = x) = 0, as the area beneath a single point is 0.

The normal distribution

  • See the previous notes!

SRS example

An opinion poll asks a SRS of 1500 adults, “do you happen to jog?” Suppose that in fact 15% of adults would answer yes to this question. However the proportion of the sample, p̂ , who answer “yes” will vary in repeated sampling. We will later find that we can suppose that p̂ is normally distributed with mean μ = 0. 15 and standard deviation σ = 0.0092. Find the probability that either less than 14% or over 16% of adults in the sample jog.

The mean of a transformation of a discrete RV

  • Ex: Now suppose that an international telephone call costs 8 cents per minute, with a 5 cent connection charge. What is the average or mean charge for an international call?
  • Let Y be some transformation of X. Then the mean or expected value of Y is

μY =

∑^ k i=

yi pi.

  • Ex (cont.): Let Y be the charge for an international tele- phone call, with Y = 8X +5. The distribution of X and Y is

value of X 1 2 3 4 value of Y probability 0.2 0.5 0.2 0.

  • Thus μY =

The mean of a continuous RV

  • Harder to calculate (need calculus!).
  • The normal and uniform distributions are both symmetric. In these cases the mean is equal to the median. Thus: - The mean of a N(μ, σ) RV is μ. - The mean of a U(a, b) RV is (a + b)/2.

The variance and standard deviation of a RV

  • Let X be a RV.
  • The distance X is away from its mean, μX , is (X − μX ).
  • The square of this distance is (X − μX )^2.
  • The variance of a RV X is the mean of this squared dis- tance: σ^2 X = μ(X−μX ) 2.
  • If X is a discrete RV then σ^2 X =

∑^ k i=

(xi − μX )^2 pi.

  • The standard deviation of X, σX , is the square root of the variance of X, σX =

σ^2 X.

The variance and stdev of certain continuous RVs

  • You should know that:
    • The variance of a N(μ, σ^2 ) RV is σ^2 , and so its standard deviation is σ.
    • The variance of a U(a, b) RV is (b − a)^2 /12, and so its standard deviation is |b − a|/√12.

Calcium example

The level of calcium in the blood of healthy young adults follows a normal distribution with mean μ = 10 milligrams per deciliter and standard deviation σ = 0.5.

  • What proportion of healthy young adults have a calcium level that lies between 9.5 and 10 milligrams per deciliter? (hint: draw the picture!)

Two young adults are drawn at random from the population of all healthy young adults. Let X denote the calcium level of the first adult and Y denote the calcium level of the second adult.

  • What is the mean and standard deviation of the difference W = X − Y?