• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
06 Mean Var
 

06 Mean Var

on

  • 969 views

 

Statistics

Views

Total Views
969
Views on SlideShare
969
Embed Views
0

Actions

Likes
0
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    06 Mean Var 06 Mean Var Presentation Transcript

    • Stat310 Mean, Variance and Distributions Hadley Wickham Saturday, 24 January 2009
    • 1. Recap: random variables & pmf 2. Expectation 3. Mean & variance 4. Meet some random variables Saturday, 24 January 2009
    • Random variable A random variable is a random experiment with a numeric sample space. (Can make many different random variables from a single random experiment) More formally, a random variable is a function that converts elements of non- numeric sample space to numbers. Saturday, 24 January 2009
    • Discrete r.v. A discrete random variable has a countable sample space, typically a subset of the integers. Saturday, 24 January 2009
    • pmf Every random variable has an associated probability mass function (pmf). The random variable says what is possible. (the sample space) The pmf says how likely each possibility is. (the probability) Saturday, 24 January 2009
    • To be a pmf A function must satisfy two properties: • f(x) ≥ 0, for all x • ∑ f(x) = 1 Saturday, 24 January 2009
    • x f(x) x f(x) x f(x) -1 0.3 10 -0.1 1 0.35 0 0.3 20 0.9 2 0.25 2 0.3 30 0.2 3 0.2 4 0.1 x f(x) x f(x) 5 0.1 5 1 10 0.1 20 0.9 30 0.2 Saturday, 24 January 2009
    • Notation Normally call pmf f If we have multiple rv’s and want to make clear which pmf belongs to which rv, we write: fX(x) fY(y) fZ(z) for X, Y, Z f1(x) f2(x) f3(3) for X1, X2, X3 Saturday, 24 January 2009
    • Notation Can give pmf in two ways: • List of numbers (for small n) • Function (for large n) These are equivalent! Also useful to display visually, with a bar plot (not a histogram: the book is wrong!) Saturday, 24 January 2009
    • a) b) 0.8 1.0 0.6 0.8 0.6 0.4 f(x) f(x) 0.4 0.2 0.2 0.0 0.0 1.0 1.5 2.0 2.5 3.0 1.0 1.5 2.0 2.5 3.0 x x c) d) 0.5 0.4 0.4 0.3 0.3 0.2 f(x) f(x) 0.2 0.1 0.1 0.0 0.0 −0.1 1 2 3 4 5 1 2 3 4 5 x x Saturday, 24 January 2009
    • Expectation • Allows us to summarise a pmf with a single number • Definition • Properties Saturday, 24 January 2009
    • Mean • Summarises the “middle” of the distribution • If you imagine the number line as a beam with weights of f(x) at position x, the balance point is the mean • mean = E(X) Saturday, 24 January 2009
    • Variance • Summarises the “spread” of a distribution • Var[X] = E[ (X - E[X])2] = ... • Expected squared distance from centre • sd[X] = Var[X]0.5 Saturday, 24 January 2009
    • Meet the distributions Discrete uniform Bernoulli Binomial Saturday, 24 January 2009
    • Discrete uniform Equally likely events f(x) = 1/m x = 1, ..., m X ~ DiscreteUniform(m) What is the mean? What is the variance? Saturday, 24 January 2009
    • Useful facts Sum of integers from i = 1 to m is Sum of squared integers from i = 1 to m is Saturday, 24 January 2009
    • Bernoulli distribution Single binary event: either happens (with probability p) or doesn’t happen X ~ Bernoulli(p) What is the mean of X? What is the variance of X? Saturday, 24 January 2009
    • Transformations If X ~ Bernoulli(p) What is 1 - X? What is X2? (Think about X, not f(x)) Saturday, 24 January 2009
    • Binomial distribution n independent Bernoulli trials with the same probability of success. X is the number of success X ~ Binomial(n, p) What is the mean? What is the variance? Better tools? Saturday, 24 January 2009