29
Atatürk University Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY Atatürk University Engineering Faculty Department of Mechanical Engineering LECTURE: PROBABILITY DISTRIBUTIONS P.S. These lecture notes are mainly based on the reference given in the last page .

STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

  • Upload
    others

  • View
    39

  • Download
    1

Embed Size (px)

Citation preview

Page 1: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

Atatürk University

Introduction to Statistics

Prof. Dr. İrfan KAYMAZ

STATISTICS and PROBABILITY

Atatürk UniversityEngineering Faculty

Department of Mechanical Engineering

LECTURE: PROBABILITY DISTRIBUTIONS

P.S. These lecture notes are mainly based on the reference given in the last page.

Page 2: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

Introduction to Statistics

Atatürk University

After carefully listening of this lecture, you should be able to do the following: Determine probabilities from probability mass functions and the

reverse. Determine probabilities from cumulative distribution functions,

and cumulative distribution functions from probability mass functions and the reverse.

Determine probabilities from probability density functions. Determine probabilities from cumulative distribution functions,

and cumulative distribution functions from probability density functions, and the reverse.

objectives of this lecture

Page 3: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityRandom Variables

A variable that associates a number with the outcome of a random experiment is called a random variable.

A random variable is a function that assigns a real number to each outcome in the sample space of a random experiment.

Particular notation is used to distinguish the random variable (rv) from the real number. The rv is denoted by an uppercase letter, such as X. After the experiment is conducted, the measured value is denoted by a lowercase letter, such a x = 70. X and x are shown in italics, e.g., P(X=x).

Page 4: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityContinuous & Discrete Random Variables

A discrete random variable is a rv with a finite (or countably infinite) range. They are usually integer counts, e.g., number of errors or number of bit errors per 100,000 transmitted (rate). The ends of the range of rv values may be finite (0 ≤ x ≤ 5) or infinite (x ≥ 0).

A continuous random variable is a rv with an interval (either finite or infinite) of real numbers for its range. Its precision depends on the measuring instrument.

Page 5: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExamples of Discrete & Continuous RVs

Continuous rv’s:

Electrical current and voltage.

Physical measurements, e.g., length, weight, time, temperature, pressure.

Discrete rv’s:

Number of scratches on a surface.

Proportion of defective parts among 100 tested.

Number of transmitted bits received in error.

Number of common stock shares traded per day.

Page 6: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityProbability Distributions

A random variable X associates the outcomes of a random experiment to a number on the number line.

The probability distribution of the random variable X is a description of the probabilities with the possible numerical values of X.

A probability distribution of a discrete random variable can be:

A list of the possible values along with their probabilities.

A formula that is used to calculate the probability in response to an input of the random variable’s value.

Page 7: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample: Digital Channel

There is a chance that a bit transmitted through a digital transmission channel is received in error.

Let X equal the number of bits received in error of the next 4 transmitted.

The associated probability distribution of X is shown as a graph and as a table.

Figure 3-1 Probability distribution for bits in error.

P(X =0) = 0.6561

P(X =1) = 0.2916

P(X =2) = 0.0486

P(X =3) = 0.0036

P(X =4) = 0.0001

1.0000

Page 8: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityProbability Mass Function

Suppose a loading on a long, thin beam places mass only at discrete points. This represents a probability distribution where the beam is the number line over the range of x and the probabilities represent the mass. That’s why it is called a probability massfunction.

Figure 3-2 Loading at discrete points on a long, thin beam.

Page 9: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityProbability Mass Function Properties

1 2

1

probability mass function

For a discrete random variable with possible values ,x , ... x ,

a is a function such that:

(1) 0

(2) 1

(3)

n

i

n

i

i

i i

X x

f x

f x

f x P X x

Page 10: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample: Wafer Contamination

Let the random variable X denote the number of wafers that need to be analyzed to detect a large particle. Assume that the probability that a wafer contains a large particle is 0.01, and that the wafers are independent. Determine the probability distribution of X.

Let p denote a wafer for which a large particle is present & let a denote a wafer in which it is absent.

The sample space is: S = {p, ap, aap, aaap, …}

The range of the values of X is: x = 1, 2, 3, 4, …

P(X =1) = 0.1 0.1

P(X =2) = (0.9)*0.1 0.09

P(X =3) = (0.9)2*0.1 0.081

P(X =4) = (0.9)3*0.2 0.0729

0.3439

Probability Distribution

Page 11: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityCumulative Distribution Functions

Example 3-6: From Example 3.4, we can express the probability of three or fewer bits being in error, denoted as P(X ≤ 3).

The event (X ≤ 3) is the union of the mutually exclusive events: (X=0), (X=1), (X=2), (X=3).

From the table:

P(X ≤ 3) = P(X=0) + P(X=1) + P(X=2) + P(X=3) = 0.9999P(X = 3) = P(X ≤ 3) - P(X ≤ 2) = 0.0036

x P(X =x ) P(X ≤x )

0 0.6561 0.6561

1 0.2916 0.9477

2 0.0486 0.9963

3 0.0036 0.9999

4 0.0001 1.0000

1.0000

Page 12: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityCumulative Distribution Function Properties

The cumulative distribution function is built from the probability mass function and vice versa.

The cumulative distribution function of a discrete random variable ,

denoted as ( ), is:

For a discrete random variable , satisfies the following properties:

(1)

(2

i

i

i

x x

i

x x

X

F x

F x F X x x

X F x

F x P X x f x

) 0 1

(3) If , then

F x

x y F x F y

Page 13: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample :Cumulative Distribution Function

Determine the probability mass function of X from this cumulative distribution function:

F (x) = 0.0 x < -2

0.2 -2 ≤ x < 0

0.7 0 ≤ x < 2

1.0 2 ≤ x

f (2) = 0.2

f (0) = 0.5

f (2) = 0.3

PMF

Figure 3-3 Graph of the CDF

Page 14: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample: Sampling without Replacement

A day’s production of 850 parts contains 50 defective parts. Two parts are selected at random without replacement. Let the random variable X equal the number of defective parts in the sample. Create the CDF of X.

14

800 799850 849

800 50850 849

50 49850 849

0 0.886

1 2 0.111

2 0.003

Therefore,

0 0 0.886

1 1 0.997

2 2 1.000

P X

P X

P X

F P X

F P X

F P X

Figure 3-4 CDF. Note that F(x) is defined for all x, - <x < , not just 0, 1 and 2.

Page 15: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityContinuous Density Functions

Density functions, in contrast to mass functions, distribute probability continuously along an interval.

The loading on the beam between points a & b is the integral of the function between points a & b.

Figure 4-1 Density function as a loading on a long, thin beam. Most of the load occurs at the larger values of x.

Page 16: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Probability

A probability density function f(x) describes the probability distribution of a continuous random variable. It is analogous to the beam loading.

Figure 4-2 Probability is determined from the area under f(x) from a to b.

Continuous Density Functions

Page 17: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityProbability Density Function

For a continuous random variable ,

a is a function such that

(1) 0 means that the function is always non-negative.

(2)

probability density functio

( ) 1

(3)

n

area

X

f x

f x dx

P a X b f x dx

under from to

(4) 0 means there is no area exactly at .

b

a

f x dx a b

f x x

Page 18: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityHistogramsA histogram is graphical display of data showing a series of adjacent

rectangles. Each rectangle has a base which represents an interval of data values. The height of the rectangle creates an area which represents the relative frequency associated with the values included in the base.

A continuous probability distribution f(x) is a model approximating a histogram. A bar has the same area of the integral of those limits.

Figure 4-3 Histogram approximates a probability density function.

Page 19: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityArea of a Point

1 2

1 2 1 2 1 2 1 2

1 2

If is a continuous random variable, for any and ,

(4-2)

which implies that 0.

From another perspective:

As approaches , the area or probability beco

X x x

P x X x P x X x P x X x P x X x

P X x

x x

1 2

mes smaller and smaller.

As becomes , the area or probability becomes zero. x x

Page 20: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample: Hole Diameter

Let the continuous random variable X denote the diameter of a hole drilled in a sheet metal component. The target diameter is 12.5 mm. Random disturbances to the process result in larger diameters. Historical data shows that the distribution of X can be modeled by f(x)= 20e-20(x-12.5), x ≥ 12.5 mm.

If a part with a diameter larger than 12.60 mm is scrapped, what proportion of parts is scrapped?

Page 21: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample: Hole Diameter

20 12.5

12.6

Figure 4-5 12.60 20 0.135x

P X e dx

Page 22: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityCumulative Distribution Functions

The

of a continuous random

cumulative distribution

variable is,

for (4-

function

3)

x

X

F x P X x f u du x

Page 23: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample :Electric Current

For the copper wire current measurement in Exercise 4-1, the cumulative distribution function (CDF) consists of three expressions to cover the entire real number line.

0 x < 0

F (x ) = 0.05x 0 ≤ x ≤ 20

1 20 < x

Figure 4-6 This graph shows the CDF as a continuous function.

Page 24: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExample :Hole Diameter

For the drilling operation in Example 4-2, F(x) consists of two expressions. This shows the proper notation.

20 12.5

12.5

20 12.5

0 for 12.5

20

1 for 12.5

xu

x

F x x

F x e du

e x

Figure 4-7 This graph shows F(x) as a continuous function.

Page 25: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityDensity vs. Cumulative Functions

The probability density function (PDF) is the derivative of the cumulative distribution function (CDF).

The cumulative distribution function (CDF) is the integral of the probability density function (PDF).

Given , as long as the derivative exists.dF x

F x f xdx

Page 26: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExercise: Reaction Time

The time until a chemical reaction is complete (in milliseconds, ms) is approximated by this CDF:

What is the PDF?

What proportion of reactions is complete within 200 ms?

0.01

0 for 01 for 0 xx

xF x

e

Page 27: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityExercise: Reaction Time

the PDF

The proportion of reactions is complete within 200 ms

0.01 0.01

0 0 for 01 0.01 for 0 xx x

dF x d xf x

e edx dx

2200 200 1 0.8647P X F e

Page 28: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

ProbabilityNext Week

Most commonly used probabilityfunctions….

Page 29: STATISTICS and PROBABILITY - Atatürk Üniversitesimuhserv.atauni.edu.tr/makine/ikaymaz/statistics/... · Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY

Atatürk University

References

Douglas C. Montgomery, George C. Runger

Applied Statistics and Probability for Engineers, John Wiley & Sons, Inc.