Download Random Variables and Discrete Probability Distributions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
11/11/1432
STAT 319 – Probability and Statistics For Engineers
LECTURE 04
Random Variables
and Discrete Probability Distributions
Engineering College, Hail University, Saudi Arabia
4.1 Introduction – Review of important
Concepts
In engineering and in management, knowing with certitude
the effects of decisions on Operations is extremely
important, yet uncertainty is a constant in any situation.
No matter how well-calibrated a machine is, it is impossible
to predict with absolute certainty how much part-to-part
variation it will generate.
Based on statistical analysis, an estimation can be made to
have an approximate
pp
idea about the results. The area of
statistics that deals with uncertainty is called probability.
Probability is the measure of the possibility for an event to
take place and to occur.
1
11/11/1432
4.1 Introduction – Review of important
Concepts
•An experiment is the process by which one observation is
obtained. An example of an experiment would be the sorting
out of defective parts from a production line
line.
•An event is the outcome of an experiment.
•
•Determining the number of employees who come to work
late twice a month is an experiment, and there are many
possible events; the possible outcomes can be anywhere
between zero and the number of employees in the company.
•A sample space is the set of all possible outcomes of the
experiment.
Random Variable
For a given sample space S of some experiment,
a random variable is any rule that associates a
number with each outcome in S .
A random variable is a numerical variable whose
measured value can change from one replicate of
the experiment to another.
Random Variable represents a possible numerical
value from a random event.
2
11/11/1432
Types of Random Variables
A discrete random variable is a random variable (rv)
whose possible values either constitute a finite set or
else can be listed in an infinite sequence
sequence.
A random variable is continuous if its set of possible
values consists of an entire interval on a number line.
Random
Variables
Discrete
Random Variable
Continuous
Random Variable
Random Variables
3
11/11/1432
4.2 Discrete Probability
Distributions
A probability distribution shows the possible
events and the associated probability for each
of these events to occur.
Table 4.1 is a distribution that shows the
weight (in grams) of a part produced by a
machine and the probability of the part
meeting quality requirements.
A distribution is said to be discrete if it is built
on discrete random variables.
A random variable is said to be discrete
when all the possible outcomes are
countable.
Discrete Random Variables
• Can only assume a countable number of values
Examples:
– Roll a die twice
Let x be the number of times 4 comes up
(then x could be 0, 1, or 2 times)
– Toss a coin 5 times.
Let x be the number of heads
(then x = 0, 1, 2, 3, 4, or 5)
4
11/11/1432
Discrete Probability Distribution
Experiment: Toss 2 Coins.
T
T
T
H
H
T
H
H
Probability Distribution
x Value
Probability
4 possible outcomes
Let x = # heads.
Probability
0
1/4 = .25
1
2/4 = .50
2
1/4 = .25
.50
.25
0
1
2
x
Discrete Probability Distribution
• The set of ordered Pairs (x, f(x) ) is called a
probability
b bilit ffunction,
ti
or probability
b bilit mass ffunction
ti
(pmf) or probability distribution function (pdf) of
the discrete random variable X if:
• f(x)
≥0
• ∑ f (x ) = 1
• P(X=x) = f(x)
5
11/11/1432
Cumulative Distribution Function
The cumulative distribution function (cdf) F(x) of a
discrete rv variable X with pmf p(x) is defined for every
number by:
F (x ) = P (X ≤ x ) =
∑
p(y )
y :y ≤ x
For any number x, F(x) is the probability that the
observed value of X will be at most x.
Example
A probability distribution for a random variable X:
x
–8
P(X = x) 0.13
–3
0.15
–1
0.17
0
0.20
Find
a. P ( X ≤ 0 )
b. P ( −3 ≤ X ≤ 1)
6
0.65
0.67
1
0.15
4
6
0.11 0.09
11/11/1432
4.3 Discrete Probability Distribution
in Engineering Applications
The four most used discrete probability
di t ib ti
distributions
iin b
business
i
operations
ti
are:
1. the binomial,
2.the Poisson,
3.the geometric, and
yp g
distributions
4.the hyper-geometric
This lecture will focus on the applications of these four
probability distributions in engineering with particular interest
to quality engineering.
Applications on the Minitab statistical software will be dealt
with.
4.3.1 Binomial Probability Distribution
The binomial distribution assumes an
experiment with n identical trials, each trial
h i only
having
l ttwo possible
ibl outcomes
t
considered
id d
as success or failure and each trial
independent of the previous ones.
If p : is the probability for a success and q as
th probability
the
b bilit ffor a failure.
f il
7
11/11/1432
Binomial Probability Distribution
where P(x) is the probability for the event x to happen.
ƒThe variable x may take any value from zero to n
ƒnCx represents the number of possible outcomes that
can be obtained.
The mean, variance, and standard deviation for a
binomial distribution are:
Binomial Probability Distribution
Engineering Example (1-1)
A machine produces soda bottles, and 98.5 percent of all
bottles produced pass a QC exam. What is the probability
of having only 2 bottles that pass audit in a randomly
selected sample of 7 bottles?
Solution:
In other words, the probability of having only two good bottles out of 7 is
zero. This result can also be found using the binomial table usually
used by Engineers.
8
11/11/1432
Binomial Probability Distribution
Using Minitab
Minitab has the capabilities to
calculate the probabilities
for more than just one event to
take place.
From the Calc menu, select
“Probability Distributions,”
then
select “Binomial,” and the
“Binomial Distribution”
(see figure)
Binomial Probability Distribution
Example using Minitab
For example (1), So in Column C1,
we want to determine the
probabilities of finding 0 to 10
bottles that pass the QC check out
of the 7 bottles that we selected.
In column C1 enter the nomber of
bottles 0-10.
Nbr of bottles
0
1
2
3
4
5
6
7
8
9
10
9
Probability
0.000000
0.000000
0.000000
0.000002
0
00000
0.000111
0.004381 S = 0.100391
0.095897
0.899609
0.000000
0.000000
0.000000
If we want to know the probability of having between 3
and 6 bottles that pass the QC audit, all we would need to
do is add the probabilities of having 3, 4, 5, and 6, and we
would obtain 0.100391.
11/11/1432
Binomial Probability Distribution
Laboratory Exercise using Minitab 1-2
A machine produces ceramic pots, and 68.9
percent of all pots weigh 5 pounds.
What is the probability of selecting 3 pots that
weigh 5 pounds in a randomly selected sample
of 8 pots?
Use both analytical solution and generate
Minitab Solution.
4.3.2 Poisson Probability Distribution
The Poisson distribution focuses on the probability for a number of
events occurring over some interval or continuum where μ, the average
off such
h an eventt occurring,
i
is
i kknown.
For instance, a Quality Control manager may want to know the
probability of finding a defective part on a manufactured product.
The formula for the Poisson distribution is:
Where :
• P(x) is the probability of the event x to occur,
• μ is the arithmetic mean number of occurrences in a particular
interval,
• e is the constant 2.7182 .
10
11/11/1432
Poisson Probability Distribution
The mean and the variance of the Poisson distribution are the same
same,
and the standard deviation is the square root of the mean:
Binomial problems can be approximated by the Poisson distribution
when the sample sizes are large (n > 20) and p is small (p ≤ 0.7). In
this case, μ = np.
Poisson Probability Distribution
Engineering Example (1.3)
Example A product failure has historically averaged 3.84
3 84 occurrences
per day. What is the probability of 5 failures in a randomly selected
day?
Solution:
The same result can be found in the Poisson table.
11
11/11/1432
Poisson Table
Poisson Probability Distribution
Using Minitab
From the Calc menu,
select “Probability
Distributions,” then
“Poisson,”
(see figure)
12
11/11/1432
Poisson Probability Distribution
Using Minitab
For example (1-3)
μ=3.84
C1 0 1,
C1=0,
1 .. , 10
C3 = Poisson probability values
N. Failures
0
1
2
3
4
5
6
7
8
9
10
Probability
0.021494
0.082535
0.158468
0.202839
0 194726
0.194726
0.149549
0.095711
0.052505
0.025202
0.010753
0.004129
Poisson Probability Distribution
Practical Case (1-4)
A CNC machine in the ME workshop
p has averaged
g a
97 percent pass rate per day. What is the probability
of having more than 7 defective products in one day?
a) Use the analytical solution.
b) Using Minitab determine the probability to have the
defective number between 0 and 20.
20
c) What is the probability of having 3 to 8 defectives
per day?
13
11/11/1432
4.3.3 Geometric Probability Distribution
For the binomial distribution, we are only interested in the probability of
a success or a failure to occur and the outcomes had an equal
opportunity to occur because the trials were independent.
The geometric distribution addresses the number of trials
necessary before the first success.
If the trials are repeated k times until the first success, we would have
k−1 failures.
If p is the probability for a success and q the probability for a failure, the
probability of the first success to occur at the kth trial will be :
The probability that more than n trials are needed before the first
success is:
Geometric Probability Distribution
The mean and standard deviation for the geometric distribution are:
14
11/11/1432
Geometric Probability Distribution
Engineering Example
The probability for finding an error by an auditor in a
production line is 0.01.
a) What is the probability that the first error is found at the
70th part audited?
b) What is the probability that more than 50 parts must be
audited before the first error is found?
Solution:
(a)
The probability that the first error is found at the 70th part
audited will be 0.004998.
(b)
4.3.4 Hyper-geometric Probability Distribution
One of the conditions of a binomial distribution was the
independence of the trials; the probability of a success
i th
is
the same ffor every ttrial.
i l
If successive trials are performed without replacement
and the sample size or population is small, the
probability for each observation will vary.
When the sampling is finite (relatively small and
known) and the
outcome changes from trial to trial, the hypergeometric distribution is used instead of the binomial
distribution.
15
11/11/1432
Hyper-geometric Probability Distribution
The formula for the hyper-geometric distribution is :
where x is an integer whose value is between zero and n.
The Mean and the Variance for the distribution are:
Minitab offers the possibility to calculate the hyper-geometric
distribution for more than one event in many engineering situations.
Hyper-geometric Probability Distribution
Engineering Example
A total of 75 parts are received from the suppliers. We are informed
that 8 defective parts were shipped by mistake, and 5 parts have
already been installed on machines
machines.
What is the probability that exactly 1 defective part was installed on a
machine?
Solution
The p
probability
y that exactly
y 1 defective was installed on a machine is:
16
11/11/1432
Hyper-geometric Probability Distribution
Minitab Solution - Engineering Example
The example:
A total of 75 parts are received
from the suppliers. We are
informed that 8 defective parts
were shipped by mistake, and
5 parts have already been
installed on machines.
The problem Data:
N = 75 : Population Size
k = 8 : Number of failures
n = 5 : Sample Size
x = 1 : the variable.
Hyper-geometric Probability Distribution
Minitab Solution - Engineering Example
The example:
A total of 75 parts are received
from the suppliers. We are
informed that 8 defective parts
were shipped by mistake, and
5 parts have already been
installed on machines.
The problem Data:
N = 75 : Population Size
k = 8 : Number of failures
n = 5 : Sample Size
x = 1 : the variable.
17
The Results:
0
1
2
3
4
5
6
7
8
9
10
0.559559
0.355276
0.077717
0.007174
0.000272
0.000003
0.000000
0 000000
0.000000
0.000000
0.000000
0.000000
11/11/1432
Th k You
Thank
Y
Any Questions ?
STAT 319 – Probability and Statistics For Engineers
Dr Mohamed AICHOUNI
&
Dr Mustapha BOUKENDAKDJI
http://faculty.uoh.edu.sa/m.aichouni/stat319/
Email: [email protected]
18