A random variable is a variable whose values are numerical outcomes of a random experiment. That is, we consider all the outcomes in a sample space S and.

Slides:



Advertisements
Similar presentations
Business Statistics for Managerial Decision
Advertisements

A.P. STATISTICS LESSON 7 – 1 ( DAY 1 ) DISCRETE AND CONTINUOUS RANDOM VARIABLES.
Random Variables A random variable is a variable (usually we use x), that has a single numerical value, determined by chance, for each outcome of a procedure.
Random Variables November 23, Discrete Random Variables A random variable is a variable whose value is a numerical outcome of a random phenomenon.
1 Continuous random variables f(x) x. 2 Continuous random variables A discrete random variable has values that are isolated numbers, e.g.: Number of boys.
Probability Distributions Random Variables: Finite and Continuous Distribution Functions Expected value April 3 – 10, 2003.
 The Law of Large Numbers – Read the preface to Chapter 7 on page 388 and be prepared to summarize the Law of Large Numbers.
Probability Distributions: Finite Random Variables.
Random Variables A random variable A variable (usually x ) that has a single numerical value (determined by chance) for each outcome of an experiment A.
Chapter 6: Modeling Random Events... Normal & Binomial Models
Stat 1510: Introducing Probability. Agenda 2  The Idea of Probability  Probability Models  Probability Rules  Finite and Discrete Probability Models.
Chapter 6: Random Variables
Week71 Discrete Random Variables A random variable (r.v.) assigns a numerical value to the outcomes in the sample space of a random phenomenon. A discrete.
Chapter 7: Random Variables
Chapter 7: The Normal Probability Distribution
7.1 Discrete and Continuous Random Variable.  Calculate the probability of a discrete random variable and display in a graph.  Calculate the probability.
Continuous Probability Distributions  Continuous Random Variable  A random variable whose space (set of possible values) is an entire interval of numbers.
PROBABILITY & STATISTICAL INFERENCE LECTURE 3 MSc in Computing (Data Analytics)
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.1 Discrete and Continuous Random Variables.
Probability, contd. Learning Objectives By the end of this lecture, you should be able to: – Describe the difference between discrete random variables.
Probability The definition – probability of an Event Applies only to the special case when 1.The sample space has a finite no.of outcomes, and 2.Each.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 34 Chapter 11 Section 1 Random Variables.
Applied Business Forecasting and Regression Analysis Review lecture 2 Randomness and Probability.
Probability and inference Random variables IPS chapters 4.3 and 4.4 © 2006 W.H. Freeman and Company.
Probability Distributions. Essential Question: What is a probability distribution and how is it displayed?
Chapter 6 Random Variables
Modular 11 Ch 7.1 to 7.2 Part I. Ch 7.1 Uniform and Normal Distribution Recall: Discrete random variable probability distribution For a continued random.
5.3 Random Variables  Random Variable  Discrete Random Variables  Continuous Random Variables  Normal Distributions as Probability Distributions 1.
BPS - 5th Ed. Chapter 101 Introducing Probability.
Outline Random processes Random variables Probability histograms
You are familiar with the term “average”, as in arithmetical average of a set of numbers (test scores for example) – we used the symbol to stand for this.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
1 Since everything is a reflection of our minds, everything can be changed by our minds.
The two way frequency table The  2 statistic Techniques for examining dependence amongst two categorical variables.
Probability and inference Random variables IPS chapters 4.3 and 4.4 © 2006 W.H. Freeman and Company.
Slide 5-1 Chapter 5 Probability and Random Variables.
Random Variables Presentation 6.. Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable.
Lecture 8. Random variables Random variables and probability distributions Discrete random variables (Continuous random variables)
MATH 2400 Ch. 10 Notes. So…the Normal Distribution. Know the 68%, 95%, 99.7% rule Calculate a z-score Be able to calculate Probabilities of… X < a(X is.
Chapter 10 Introducing Probability BPS - 5th Ed. Chapter 101.
CY1B2 Statistics1 (ii) Poisson distribution The Poisson distribution resembles the binomial distribution if the probability of an accident is very small.
Probability –classical approach P(event E) = N e /N, where N = total number of possible outcomes, N e = total number of outcomes in event E assumes equally.
Inference: Probabilities and Distributions Feb , 2012.
Random Variables Ch. 6. Flip a fair coin 4 times. List all the possible outcomes. Let X be the number of heads. A probability model describes the possible.
BPS - 3rd Ed. Chapter 91 Introducing Probability.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.1 Discrete and Continuous Random Variables.
Lesson Discrete Random Variables. Objectives Distinguish between discrete and continuous random variables Identify discrete probability distributions.
Discrete Random Variables. Introduction In previous lectures we established a foundation of the probability theory; we applied the probability theory.
Probability Theory Modelling random phenomena. Permutations the number of ways that you can order n objects is: n! = n(n-1)(n-2)(n-3)…(3)(2)(1) Definition:
AP STATISTICS Section 7.1 Random Variables. Objective: To be able to recognize discrete and continuous random variables and calculate probabilities using.
1 Keep Life Simple! We live and work and dream, Each has his little scheme, Sometimes we laugh; sometimes we cry, And thus the days go by.
A random variable is a variable whose values are numerical outcomes of a random experiment. That is, we consider all the outcomes in a sample space S and.
Chapter 7 The Normal Probability Distribution 7.1 Properties of the Normal Distribution.
1 Chapter 10 Probability. Chapter 102 Idea of Probability u Probability is the science of chance behavior u Chance behavior is unpredictable in the short.
A statistic from a random sample or randomized experiment is a random variable. The probability distribution of this random variable is called its sampling.
PROBABILITY DISTRIBUTIONS DISCRETE RANDOM VARIABLES OUTCOMES & EVENTS Mrs. Aldous & Mr. Thauvette IB DP SL Mathematics.
THE NORMAL DISTRIBUTION
Probability Distributions ( 확률분포 ) Chapter 5. 2 모든 가능한 ( 확률 ) 변수의 값에 대해 확률을 할당하는 체계 X 가 1, 2, …, 6 의 값을 가진다면 이 6 개 변수 값에 확률을 할당하는 함수 Definition.
Discrete Random Variables Section 6.1. Objectives Distinguish between discrete and continuous random variables Identify discrete probability distributions.
!! DRAFT !! STA 291 Lecture 14, Chap 9 9 Sampling Distributions
Randomness and probability
Discrete and Continuous Random Variables
Lecture 8.
BIOS 501 Lecture 3 Binomial and Normal Distribution
Lecture 13 Sections 5.4 – 5.6 Objectives:
Chapter 10 - Introducing Probability
Chapter 6: Random Variables
7.1: Discrete and Continuous Random Variables
Discrete & Continuous Random Variables
A statistic from a random sample or randomized experiment is a random variable. The probability distribution of this random variable is called its sampling.
Presentation transcript:

A random variable is a variable whose values are numerical outcomes of a random experiment. That is, we consider all the outcomes in a sample space S and then associate a number with each outcome Example: Toss a fair coin 4 times and let X=the number of Heads in the 4 tosses We write the so-called probability distribution of X as a list of the values X takes on along with the corresponding probabilities that X takes on those values. We know X is B(4,.5)

Recall the figure below showing the probability distribution of X. Eachindividual outcome has prob=1/16, and using dbinom(0:4,4,.5) you can find the P(X=x), where x=0,1,2,3,4

There are two types of r.v.s: discrete and continuous. A r.v. X is discrete if the number of values X takes on is finite (or countably infinite). In the case of any discrete X, its probability distribution is simply a list of its values along with the corresponding probabilities X takes on those values. Values of X: x 1 x 2 … x k P(X): p 1 p 2 p k NOTE: each value of p is between 0 and 1 and all the values of p sum to 1. We display probability distributions for discrete r.v.s with so-called probability histograms. The next slide shows the Binomial probability histogram for X=# of Hs in 4 tosses of a fair coin.

The next slide gives a similar example...

Toss a fair coin until you get the first occurrence of "H". Let X = the number of the toss on which the first "H" appears. What are the possible values of X? What are the corresponding probabilities? Values of X: … P(X): X is called a geometric r.v. and in R is computed with the dgeom, pgeom, qgeom, rgeom functions - the d, p, q, and r stand for the same functions we've seen before… what would the probability histogram look like?

A continuous r.v. X takes its values in an interval of real numbers. The probability distribution of a continuous X is described by a density curve, whose values lie wholly above the horizontal axis, whose total area under the curve is 1, and where probabilities about X correspond to areas under the curve.

The first example is the random variable which randomly chooses a number between 0 and 1 (perhaps using a spinner). This r.v. is called the uniform random variable and has a density curve that is completely flat! Probabilities correspond to areas under the curve... use the punif(x) = P(X <= x) to get the areas under the uniform r.v.; e.g., P(.3 < X <.7) = punif(.7) - punif(.4)

A continuous random variable X takes all values in an interval. Example: There are an infinite number of values between 0 and 1 (e.g., 0.001, 0.4, ). How do we assign probabilities to events in an infinite sample space?  We use density curves and compute probabilities for intervals.  The probability of any event is the area under the density curve for the values of X that make up the event. The probability that X falls between 0.3 and 0.7 is the area under the density curve for that interval (base x height for this density): P(0.3 ≤ X ≤ 0.7) = (0.7 – 0.3)*1 = 0.4 This is a uniform density curve for the variable X. X

P(X 0.8) = P(X 0.8) = 1 – P(0.5 < X < 0.8) = 0.7 (You may use either the “OR” Rule or the “NOT” Rule...) The probability of a single point is zero since there is no area above a point! This makes the following statement true: The probability of a single point is meaningless for a continuous random variable. Only intervals can have a non-zero probability, represented by the area under the density curve for that interval. Height = 1 X The probability of an interval is the same whether boundary values are included or excluded: P(0 ≤ X ≤ 0.5) = (0.5 – 0)*1 = 0.5 P(0 < X < 0.5) = (0.5 – 0)*1 = 0.5 P(0 ≤ X < 0.5) = (0.5 – 0)*1 = 0.5

The other example of a continuous r.v. that we’ve already seen is the normal random variable. See the next slide for a reminder of how we’ve used the normal and how it relates to probabilities under the normal curve...

Because the probability of drawing one individual at random depends on the frequency of this type of individual in the population, the probability is also the shaded area under the curve. The shaded area under a density curve shows the proportion, or %, of individuals in a population with values of X between x 1 and x 2. % individuals with X such that x 1 < X < x 2 Continuous random variable and population distribution

Mean of a random variable The mean x bar of a set of observations is their arithmetic average. The mean µ of a random variable X is a weighted average of the possible values of X, reflecting the fact that all outcomes might not be equally likely. Value of X Probability1/83/83/81/8 HMMHHM MHMHMH MMMMMHMHHHHH A basketball player shoots three free throws. The random variable X is the number of baskets successfully made (“H”). The mean of a random variable X is also called expected value of X. What is the expected number of baskets made? Do the computations...

We’ve already discussed the mean of a density curve as being the “balance point” of the curve… to establish this mathematically requires some higher level math… So we’ll think of the mean of a continuous r.v. in this way. For a discrete r.v., we’ll compute the mean (or expected value) as a weighted average of the values of X, the weights being the corresponding probabilities. E.g., the mean # of Hs in 4 tosses of a fair coin is computed as: (1/16)*0 + (4/16)*1 + (6/16)*2 + (4/16)*3 + (1/16)*4 = (32/16) = 2. In either case (discrete or continuous), the interpretation of the mean is as the long-run average value of X (in a large number of repetitions of the experiment giving rise to X). We've used mean(rbinom(1000, 5,.1)) for example to simulate the mean of a binomial r.v. (n=5, p=.1).

Look at the Pick 3 Lottery, like the old numbers game…you pay $1 to play (pick a 3 digit number), and if your number comes up, you win $500; otherwise, you win nothing. What is the probability that you win (i.e., that your 3 digits match the ones chosen that night)? What is the probability that you lose? Define X = your winnings when you play "Pick 3" possible values of X: P(X) : So what is your expected winnings?

There's also a discrete uniform r.v.: Like Table B that I've handed out… sample(0:9, 1, replace=T), chooses 1 number from Table B; sample(0:9,100,replace=T) chooses 100. Let X = the digit chosen at random from Table B What are the values of X? What are the corresponding probabilities? What is the mean? Use the sample function to simulate this and see if you can tell what the mean and s.d. are… HINT: Try this: z=numeric(1000); zz=numeric(1000) for (i in 1:1000) { x=sample(0:9,20,replace=T); m=mean(x); s=sd(x) z[i] = m ; zz[i] = s } par(mfrow=c(1,2)) hist(z) ; hist(zz) mean(z) ; mean(zz)

Now what if we look at means of samples of size n=20 of these 10 digits (0,1,…,9) - what does the distribution look like then? Try this R code: par(mfrow=c(1,1)) #a single plot per page z=numeric(1000) for (i in 1:1000) { x=sample(0:9,20,replace=T); m=mean(x); z[i] = m} hist(z) ; mean(z) ; sd(z) What's going on here? Notice especially the standard deviation - compare the sd of this simulation of means of samples of 20 with the sd of samples of 20… why is the sd of the means ~.6 while the sd of the digits is ~2.9 ? Is there an intuitive reason why this might be happening? The mathematical reason is called the Central Limit Theorem.

Central Limit Theorem: Suppose we take a large sample of size n from a population with mean =  and sd =  (call the sample X 1, X 2, …, X n ). If Xbar = mean(X 1, X 2, …, X n ), then the distribution of Xbar will look Normal with mean =  and sd =  /sqrt(n). All the situations we've been looking at prior to this are examples of the CLT: –Binomial(n, p) with large n tends to look Normal (np, sqrt(np(1-p)) –p-hat with large n tends to look Normat( p, sqrt(p(1-p)/n) ) –means of samples of size n=20 from the digits 0:9, tend to look Normal ( 4.5, 2.87/sqrt(20) ) Now you try these (Hand in next time): –Choose n=25 numbers at random from the interval [0,1] (see runif) simulate this choice of 25 numbers enough times (1000) to convince you that the mean of this population of numbers from 0 to 1 is ~.5 and the sd is ~.29 so what would the CLT say about the mean of the samples of 25? simulate this and verify by looking at a histogram and by computing the mean and sd of the means…