random variables and probability distributionsmimoza.marmara.edu.tr/~cem/se/st3.pdf · • the...

71
Random Variables and Probability Distributions

Upload: others

Post on 13-Oct-2019

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

Random Variables and

Probability Distributions

Page 2: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• capital letter X, to denote a random variable

• corresponding small letter, x for one of its values.

• Statistics is concerned with making inferences about

populations and population characteristics.

Page 3: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for which 0 and 1 are chosen• to describe the two possible values is called a Bernoulli random variable.

Page 4: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• a statistical experiment, any process by which several chance observations are generated

• S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD},where N nondefective and D defective.

• concerned with the number of defectives• A random variable is a function that associates a real

number with each element in the sample space. • the random variable X assumes the value 2 • for all elements in the subset E = {DDN, DND, NDD} of

the sample space S.

Page 5: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 6: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 7: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• If a sample space contains a finite number of possibilities

• Or an unending sequence with as many elements as there are

whole numbers,

• it is called a discrete sample space.

• If a sample space contains an infinite number of possibilities

• equal to the number of points on a line segment,

• it is called a continuous sample space.

Page 8: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 9: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• A random variable is called a discrete random variable

• if its set of possible outcomes is countable.

• But a random variable whose set of possible values is an

entire interval of numbers is not discrete.

• When a random variable can take on values on a continuous

scale,

• it is called a continuous random variable.

Page 10: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 11: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 12: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 13: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

Let W be a random variable

in three tosses of a coin.

number of heads minus the number of tails

List the elements of the sample space S

to each sample point assign a value w of W.

Page 14: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 15: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

What is a cumulative probability distribution (CD)?

• A table of the probabilities

cumulated over the events.

• The CD is a monotonically

increasing set of numbers

• The CD always ends with at

the highest value of 1.

Page 16: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

Examples of e probability distribution (PD): Bernoulli Random Variables (RV)

•Bernoulli distribution: The outcome is either a

• “failure” (0) or a (1).

•X is a bernoulli RV when

•Pr(X = 0) = p “failure”

•Pr(X = 1) = (1 − p) “success”

• The bernoulli distribution has one parameter, p

Page 17: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

The cumulative probability distribution (CD)of a Bernoulli Random Variables (RV)

• We need to know what p of

the RV is. Say p = 0.35.

• The CD of this Bernoulli RV

is:

Page 18: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• X is a random variable whose values x are the possible numbers of defective computers purchased by the school.

• Then x can only take the numbers 0, 1, 2

Page 19: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 20: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

It is often helpful to look at a probability distribution in graphic form.

Page 21: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 22: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 23: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 24: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 25: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 26: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 27: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 28: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 29: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

Continuous Probability Distributions

• A probability density function is constructed

• the area under its curveis 1

Page 30: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 31: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 32: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 33: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 34: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 35: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 36: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 37: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 38: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 39: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 40: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 41: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

The CDF, F(x), is area function of the PDF, obtained by integrating the PDFfrom negative infinity to an arbitrary value x.

Page 42: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 43: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 44: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 45: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 46: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 47: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

Joint Probability Distributions

• X and Y are two discrete random variables, • the probability distribution for their simultaneous

occurrence by a function f(x, y)• pair of values (x, y) within the range of the random

variables X and Y .• refer to this function as the joint probability distribution of

X and Y .• in the discrete case, f(x, y) = P(X = x, Y = y);• f(x, y) give the probability that outcomes x and y occur at

the same time.

Page 48: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

Joint Probability Distributions

• Sometimes we’re simultaneously interested in two or more variables in a random experiment.

• We’re looking for a relationship between the two variables.

• Examples for discrete r.v.’s • • Year in college vs. Number of credits taken

• Number of cigarettes smoked per day vs. Day of the week

• Examples for continuous r.v.’s• Time when bus driver picks you up vs. Quantity of caffeine in bus driver’s

system

• Dosage of a drug (ml) vs. Blood compound measure (percentage)

Page 49: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 50: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 51: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 52: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 53: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 54: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 55: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 56: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

• probability distribution g(x) of X alone is obtained by summing f(x, y) over the values of Y .

• probability distribution h(y) of Y alone is obtained by summing f(x, y) over the values of X.

• g(x) and h(y) to be the marginal distributions of X and Y

Page 57: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 58: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 59: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 60: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 61: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 62: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 63: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 64: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 65: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 66: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 67: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for

we rolled two dice and let X be the value on the first die and T be the total on both dice. Compute the marginal pmf of X and of T.

Page 68: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 69: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 70: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for
Page 71: Random Variables and Probability Distributionsmimoza.marmara.edu.tr/~cem/SE/ST3.pdf · • the assignment of 1 or 0 is arbitrary though quite convenient. • The random variable for