MAT 121 Probability and Statistics For Science and Engineering
MAT 121 Probability and Statistics For Science and Engineering
MAT 121
Probability and Statistics for Science and Engineering
Lecture Notes
A set is really just a collection of objects (called members or elements). It is used to group objects together.
A common way is to list the element within the curly bracket {}. Let’s understand it graphically-
Example:
Combination: A combination is a grouping of Formula: The number of combinations of n Example: How many pairs can be made from a
outcomes in which the order does not matter things chosen r at a time is found using nCr = group of 6 people?
n!/r!(n-r)!
Hint. (Jim and Tom are the same pair as Tom
and Jim)
6C2=6!/2!(6-2)! = 15
Permutation: A permutation is an arrangement Formula: The number of permutation of n things Example: 6 people are in a contest. How many
st nd
of outcomes in which the order does matter chosen r at a time is found using nPr = n!/(n-r)! ways can 1 and 2 place be awarded.
st nd
Hint. (Jim 1 and Tom 2 is different than
st nd
Tom 1 and Jim 2 )
6P2=6!/(6-2)! = 30
Combination Or Permutation:
Ex1. In a group of 10 people, three $10 prizes will be given. How many ways can the prizes be distributed?
Ex2. How many groups of 5 people can you form from 10 peoples?
Ex3. How many sets of 5 questions can be chosen from a list of 24 questions?
Ex4: How many 3 letter words with or without meaning can be formed out of the letters of the word SWING when repetition of letters is not allowed?
Example 1
The set V of all vowels in the English language can be written as V = {a, e, i, o, u}.
Example 2
The set O of odd positive integers less than 10 can be expressed as O = {1, 3, 5, 7, 9}.
Two sets are equal if and only if their elements are common. Therefore, the sets {1, 3, 5}, {5, 3, 1}, and {1, 1, 3, 3, 5, 5} are equal.
A subset is defined as a set containing some of the element of another set. Assuming A = {1, 2, 3, 4, 5, 6}, the set B = {3, 4, 5} is a subset of A. Symbolically, this is
written as B A. It can also be said that A is a superset of B, which is written symbolically as A B. A set is always a subset of itself.
⊂ ⊃
A null set, denoted with is a set with no elements. It is also called an empty set.
φ
A universal set U of a set A is defined as a superset from where the set A has been derived. Therefore, for the set A above, the universal set U can be considered to be a set
of all alphabets in English language.
Sets can also be represented using Venn diagram. The universal set is normally denoted with a rectangle, and other sets are drawn within the rectangle
Example 3
Let A = {1, 3, 4, 6} and B = {3, 5, 6, 7}. A B = {1, 3, 4, 5, 6, 7}.
∪
Example 4
Let A = {1, 3, 4, 6} and B = {3, 5, 6, 7}. A B = {3, 6}.
∩
A printed circuit board has eight different locations in which a component can be placed. If five identical components are to be placed on the board, how many different
designs are possible?
Example-2
A bin of 50 manufactured parts contains three defective parts and 47 non-defective parts. A sample of six parts is selected from the 50 parts without replacement. That is, each part can
only be selected once and the sample is a subset of the 50 parts. How many different samples are there of size six that contain exactly two defective parts?
Now we try to answer the question: what is probability? Before we answer this question, we will look at some real life examples:
Take an example of turning on the light. If you turn the switch on, are you absolutely sure that the light will come on? The answer is obviously ‘no’. There are many
things that can go wrong. The switch itself can be defective; there can be no electricity; the connecting wires can be out of order; the bulb itself can be burnt. No matter
how little are the chances, all these events can happen! Therefore, there is a chance if we turn the lights on, it would not come on.
Think about a quality control system in a factory. We accept the fact that a production line would manufacture defective items. The objective of the quality control system
is to stop the defective item from being shipped out. If all goes well, a defective item would be stopped by the quality control system. What might also happen is ( i) a
defective item passes through inspection; (ii) a non-defective item is stopped by inspection. There are possibilities that these events might happen.
We take the example of a telephone switching system. An important question here is what should be the capacity of the system. This depends upon call arriving rates, and
length of calls. Both the call arrival rates and the length of calls have a pattern; hence probabilistic. Therefore, the capacity of the system depends upon both these
probabilistic systems.
a) To evaluate probability, we define three terms: random experiment, sample space and event.
Example-3
We would like to investigate the rolling a 6-faced dice. Experiment: Rolling of a 6-faced dice
Space: {1, 2, 3, 4, 5, 6}
Example-4
With probability, we determine ‘What is the likelihood that an event would happen’. We denote this by p(A), p(B), etc.
Example-5
1000 items were inspected from a production line and 17 were found defective. If an item is inspected at random, what is the probability of finding the item defective?
Solution:
We have conducted the ‘experiment of inspection 1000 times and we observed the event 17 times. Therefore p(defective item) = 17/1000 = 0.17.
Example-6
A team standing at a street intersection counts the types of automobiles passing through the intersection. They find that there were 32 buses, 64 auto rickshaws, 45 cars,
28 taxicabs, and 43 motorbikes. If an automobile passes through the intersection, what is the probability that the automobile is (i) a car, (ii) motorbike?
Solution: In total there were 212 automobiles. Therefore p(car)= No. of cars passing through the intersection/ total no. of automobiles passing through the intersection =
45/212 = 0.2123
p(motorbike) = No. of motorbikes passing through the intersection/ total no. of automobiles passing through the intersection=43/212 = 0.202.
If all the possible outcome of an experiment is equally likely, then the probability of an event can be given by the classical formula.
p(A) = No. of ways event A can occur/ No. of ways the experiment can proceed
Example-7
A fair dice is rolled. Find the probability of (i) getting a 3; (ii) getting a number greater than3.
Solution: The space for this problem is S = {1, 2, 3, 4, 5, 6}. Let us define event A: the top face is a 3. Event A can happen only if the top face is a 3; i.e. only one way. The
experiment of rolling a dice has six possible outcomes given by the space S. Therefore p(A)= n(A)/n(S) = 1/6.
For the second problem, define the event B: the top face is greater than 3. This event can happen in three ways: if the top face is a 4, 5, or 6. So B = {4, 5, 6}. Therefore
Example-8
A fair coin is tossed twice. The space S = {hh, ht, th, tt}. Let us find the probabilities of the following events.
Review:
Idea of Probability
Assign value between 0 and 1 to an event, which gives the chance of event will occur
● Near 0: unlikely
● Near 1: likely
Do a random experiment, is a method of getting random events or outcomes (denoted by E). Probability is denoted by p and is defined as for an event E
conducted
No. of times the experiment was conducted is known as sample space (denoted by S). The range of P(E) is between 0 and 1 inclusive.
Two events A and B are mutually exclusive if A B = i.e. A and B have no outcomes in common (more clearly events A and B can't both occur simultaneously).
φ
The entire sample space S is a subset. Here p=1 e.g. p(S) =1. This event is called the certain (or sure) event.
The probability of getting an empty set is called the improbable (or impossible) event. Here p =0.
p(A), where A: the two rolls are same p(B), where B: the second
roll is 1
p(C), where C: The sum of the two roll is 8 and p(D), where D: the sum of the two rolls is at
least 10.
From S, we see A = {(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)}. Therefore, P(A) = n(A)/n(S) = 6/36 =
1/6
B = {(1,1), (2,1), (3,1), (4,1), (5,1), (6,1)}. Therefore, P(B) = n(B)/n(S) = 6/36 = 1/6
D = {(4,6), (5,5), (5,6), (6,4), (6,5), (6,6)}. Therefore, P(D) = n(D)/n(S) =6/36
Example 2: In setting up a computer system for the home firm to use in quality control, a computer expert has four choices for the main unit: IBM, VAX, Honeywell or
HP. There are six brands of CRTs monitors that can be purchased and three types of graphics printers.
(a) If all the equipment is compatible, in how many ways can the system be designed?
(b) If the expert wants to be able to use a statistical software package that is only available on IBM and VAX equipment, in how many ways can the system be
designed?
Example 3: Two CDs are randomly drawn from a box containing 6 white and 5 black disks. What is the probability that one of the drawn disk white and the other one
black?
2 1 1 2
Solution: S = 11c possible disks. P (W and B) = 6c x5c /11c =0.54
Example 4: A firm offers a choice of 10 free software packages to buyers of their new home computer. There are 25 packages from which to choose. In how many ways
can the selection be made? Five of the packages are computer games. How many selections are possible if exactly three computer games are selected?
𝟏𝟎
Solution: Possible number of ways selection can be made S = 𝟐𝟓𝑪 =3268760. Possible number of ways if exactly 3 computer games are selected from 5 packages
𝟑 𝟕
=(𝟓𝑪 ) (𝟐𝟎𝑪 )=775200
Example 5: A firm employs 10 programmers, 8 systems analysts, 4 computer experts and 3 statisticians. A team is to be chosen to handle a new long-term project. The
team will consist of 3 programmers, 2 systems analysts, 2 Computer experts and 1 statistician. Find how many ways can the team be chosen?
C
Solution: S = 10 8 4 3 60480 possible ways the team can be chosen.
3 × × × =
2 2 C 1 C C
Example 6: A project manager has 10 Computer Engineers on her staff. Four are women and six are men. These engineers are qualified. In a random selection of 3, what
𝟑 𝟎
(𝟔𝑪 )(𝟒𝑪 )
Solution: P(no women) = ⁄𝟏𝟎𝑪 =1/6. No, 1/6 is not an unusual case.
�
Example 7: A computer system uses passwords that consist of 6 letters followed by a single digit.
(b) How many passwords consist of 4A’s and 2B’s and ends in an odd digit?
(c) If any forget password but remember that it has the characteristics described in part (a) what is the chance that one will guess the password correctly on the first
attempt?
6 6
Solution: (a) (26) 10 (b) (6!/4!2!)5 (c) 1/((26) 10)
Example 8: A committee of size 5 is to be selected from a group of 6 male students and 9 female students. If the selection is made randomly, what is the probability that
and ( ) 9 possible choices of 2 women, it follows that the desired probability is given by
(6)(9)
32
=240/1001 (15)
5
Example 9: A class in probability theory consists of 6 male students and 4 female students. One quiz is conducted and the students are ranked according to their
performance:
(b) If all rankings are considered equally likely, what is the probability that female students receive the top 4 scores?
Solution: (a) Because each ranking corresponds to a particular ordered arrangement of the 10 people, we see the answer to this part is 10! = 3,628,800.
(b) Because there are 4! possible rankings of the female among themselves and 6! Possible rankings of the male among themselves, it follows from the basic
= (720)(24)=17,280 possible rankings in which the female receive the top 4 scores. So, probability is (6!)(4!) /10! = 17,280 /3,628,800
Example 10: Suppose at the time of launch the primary computer system is backed up by two secondary systems. We are interested in the readiness of these three systems
at launch time. What is the appropriate sample space for this experiment?
Solution: Here S = {yyy, yyn, yny, ynn, nyy, nyn, nny, nnn}, where y the systems are operable and n are not operable.
Let A: primary system is operable, B: First backup is operable and C: Second backup is operable Here A = {yyy, yyn, yny, ynn}, B = {yyy, yyn, nyy, nyn} and C = {yyy,
Thus, A B = {yyy, yyn, yny, ynn, nyy,nyn} and A B = {yyy,yyn} and C = { yyn, ynn, nyn, nnn}
∪ ∩ ′
Example 11: If 10 people are present in a room, what is the probability that no two of them celebrate their birthday on the same day of the year?
10
Solution: Because each person can celebrate his or her birthday on any one of 365 days, there are a total of (365) possible outcomes.
There are (365)(364)(363) ・(365 –10 + 1) possible outcomes that result in no two of the people having the same birthday. This is so because the first person could have
10
the next person any of the remaining 364 days, the next any of the remaining 363, and so on. So, probability is (365)(364)(363)・(365 –10 + 1) /(365) .
Example 12: An electrical control panel has three toggle switches labeled I, II, and III each of which can be either on (O) or off (F).
a) Construct a tree to represent the possible configurations for these three switches.
b) List the elements of the sample space generated by the tree.
c) List the sample points that constitutes the events A: at least one switch is on
B: switch 1 is on C: no switch is on
d) Are events A and B mutually exclusive? Are events A and C mutually exclusive? Are events A and D mutually exclusive?
Example 13: An experiment consists of selecting a digit from among the digits 0 to 9 in such a way that each digit has the chance of being selected as any other. We
name the digit selected A. These lines of code are then executed:
IF A<2 THEN B=12; ELSE B=17; IF B=12 THEN C=A-1; ELSE C=0
a) Construct a tree to illustrate the ways in which values can be assigned to the variables A,B and C.
Problem-1: If the last digit of a weight measurement is equally likely to be any of the digits 0 through 9,
(a) Find the sample space. (b) What is the probability that the last digit is 6?
(c) What is the probability that the last digit is less than or equal to 6?
Problem-2: If p(A) = 0.4, p(B) = 0.3 and p(A B) = 0.2. Find the following probabilities:
∩
(a) p(A ) (b) p(A B) (c) p(A B) (d) p(A B ) (e) p[(A B)] (f ) p(A B)
′ ∪ ′∩ ∩ ′ ∪ ′ ′∪
Problem-3: If A, B and C are mutually exclusive events with p(A) = 0.3, p(B) = 0.2 and p(C) =
(e) p(A B C )
′∩ ′∩ ′
no 120 18
(a) What is the probability that the selected shaft conforms to surface finish requirements or to roundness requirements?
(b) What is the probability that the selected shaft either conforms to surface finish requirements or does not conform to roundness requirements?
(c) What is the probability that the selected shaft conforms to both surface finish and roundness requirements?
(d) If a shaft is selected at random, what is the probability that the shaft conforms to surface finish requirements?
Problem-5: Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock resistance. The results from a certain number of disks are summarized as
follows:
Scratch resistance
high low
low 160 50
(a) If a disk is selected at random, what is the probability that its scratch resistance is low or its shock resistance is high?
(b) If a disk is selected at random, what is the probability that its scratch resistance is low and its shock resistance is low?
(c) Consider the event that a disk has high scratch resistance and the event that a disk has high shock resistance. Are these two events equally likely and mutually
exclusive?
Problem-6: The shafts are further classified in terms of the machine tool that was used for manufacturing the shaft.
Tool 1
Roun
dnes
conf
Tool 2 orms
yes
S
u
r
f
a
c
e
f
i
n
i
s
h
c
o
n
f
o
r
m no 40 20
s
y
e
Roundness conforms
s
yes no
no 80 60
(a) If a shaft is selected at random, what is the probability that the shaft conforms to surface finish requirements or does not conform to roundness
(b) If a shaft is selected at random, what is the probability that the shaft conforms to surface finish requirements or to roundness requirements or is from
Tool 1?
(c) If a shaft is selected at random, what is the probability that the shaft conforms to surface finish requirements or the shaft is from Tool 2?
(d) If a shaft is selected at random, what is the probability that the shaft conforms to both surface finish and roundness requirements or the shaft is from Tool 2?
Compound Events
If two or more events altogether happen i.e. more than one sample point is included in an event. For examples:
A: two rolls are same B: the sum of two rolls is at least 9 are compound events. On the other hand p(1), p(2), …. , p(6)
Practice problems
Suppose that A denotes the event that weight exceeds 11 grams, let B denote the event that weight is less than or equal to 15 grams and let C denote the event that weight
is greater than or equal to 8 grams and less than 12 grams. Describe the following events and find the probabilities of the above events.
(i) A (B C)
∪ ∩
Solution: S = nonnegative integers from 0 to the largest integer that can be displayed by the scale
S ={0, 1, 2, 3, . . .}
(b) S (c) {12, 13, 14, 15} (d) {0, 1, 2, . . . , 11} (e) S (f) (g) {0,1,2,…,7} (h)
φ φ
th
2. i
Four bits are transmitted over a digital communications channel. Each bit is either distorted or received without distortion. Let A denote the event that the i bit is
distorted, i = 1, 2, 3, 4.
(b) i
Are the A ’s equally likely and mutually exclusive?
1 1 1 2 3 4
Describe the outcomes in each of the following events: (c) A (d) A ′ (e) A A A A
∩ ∩ ∩
1 2 3 4
(f) (A A) (A A)
∩ ∪ ∩
3. A sample of three devices is selected from a manufacturing line and each device is classified as either acceptable or defective. Let A, B and C denote events of first,
second and third devices respectively are defective. Find the probabilities of each of the following events: (a) p(A) (b) p(B)
4. Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock resistance. The results from 100 disks are summarized below:
Shock resistance
high low
low 34 8
Use a tree diagram to represent the possible outcomes of this experiment. Let A denote the event that a disk has high shock resistance, and let B denote the event that a
disk has high scratch resistance. Determine the number of disks in p(A B), p(A′) and p(A B).
∩ ∪
5. The rise time of a reactor is measured in minutes (and fractions of minutes). Let the sample space be positive, real numbers. Define the events A and B as
B = {x | x > 50}. Find the probabilities each of the following events: (a) p(A′) (b) p(B′) (c) p(A
∩
B) (d) p(A B)
∪
6. A sample of two printed circuit boards is selected without replacement from a batch. Describe the (ordered) sample space for each of the following batches:
(a) The batch contains 90 boards that are not defective, 8 boards with minor defects, and 2 boards with major defects.
(b) The batch contains 90 boards that are not defective, 8 boards with minor defects, and 1 board with major defects.
Solution:
2
a) S = 3 =9 ((ND,ND), (ND,mD), (ND,MD), ….. (MD,MD))
2
b) S = 3 -1=8 (((ND,ND), (ND,mD), (ND,MD), …..(MD,mD)), not (MD,MD) this one because 1 board with major defects.
7. A sample of two items is selected without replacement from a batch. Describe the (ordered) sample space for each of the following batches:
Solution:
a) {ab, ac, ad, bc, bd, cd, ba, ca, da, cb, db, dc} = 12
b) {ab, ac, ad, ae, af, ag, ba, bc, bd, be, bf, bg, cq, cb, cd, ce, cf, cg, da, db, dc, de, df, dg, ea, eb, ec, ed, ef, eg, fa, fb, fc, fd, fe, fg, ga, gb, gc, gd, ge, gf } =42
8. Each of the possible five outcomes of a random experiment is equally likely. The sample space is { a, b, c, d, e}. Let A denote the event {a, b, c}, and let B denote
the event {c, d, e}. Determine the following: (a) p(A) (b) p(B) (c) p(A ) (d) p(A B) (e) p(A B)
′ ∪ ∩
9. Orders for a computer are summarized by the optional features that are requested as follows:
proportion of orders
(b) What is the probability that an order requests at least one optional feature?
(c) What is the probability that an order does not request more than one optional feature?
10. A sample preparation for a chemical measurement is completed correctly by 25% of the lab technicians, completed with a minor error by 70%, and
(a) Find the sample space. What is the probability that it is completed with either a minor or a major error?
(b) If a technician is selected randomly to complete the preparation, what is the probability it is completed without error?
Solution:
p(a minor or a major error) = p(a minor) p( a major error) = 0.70+0.05 = 0.75 = 75%
∪
11. Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock resistance. The results from a certain number of disks are summarized as
follows:
shock resistance
high low
low 116 25
Let A denote the event that a disk has high shock resistance, and let B denote the event that a disk has high scratch resistance. If a disk is selected at random, determine the
following probabilities:
(a) p(A) (b) p(B) (c) p(A ) (d) p(A B) (e) p(A B) (f) p(A B) (g) p(A B’
′ ∪ ∩ ′∩ ∩
We will be familiar with probability laws that will help us to solve real life real-life in more comfortable ways. These are:
p(A or B) = p(A B) = p(A) + p(B) – p(A B) known as mutually inclusive events (if they occur at the same time. Another word mutually inclusive is joint. By notation,
∪ ∩
p(A B) 0).
∩ ≠
p(A B) = 0).
∩
Problem-1
Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock resistance. The results from 100 disks are summarized as follows:
Shock resistance
high low
low 16 5
If a disk is selected at random, what is the probability that its scratch resistance is high or its shock resistance is high?
Problem -2
Roundness conforms
yes no
no 12 8
(a) What is the probability that the selected shaft conforms to surface finish requirements or to roundness requirements?
(b) What is the probability that the selected shaft either conforms to surface finish requirements or does not conform to roundness requirements?
The distribution of blood types in Computer Science students is roughly 41% type A, 9% type B, 4% AB and 46% type O. A student is brought into an emergency room and is to be
blood-typed. What is the chance that the type will be A, B or AB?
Solution
S = {A, B, AB, O}. Thus P(A or B or AB) = P (A∪B∪AB) = 0.41 + 0.09 + 0.04 = 0.54=54%.
Problem-4
Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock resistance. The results from 100 disks are summarized as follows:
low 16 5
If a disk is selected at random, what is the probability that its scratch resistance is not high?
Rule: If A and B are two events, then P(A|B) denotes the conditional probability of A, given B and is defined as
P(A|B) = p(A∩B)/P(B) .
Problem-5
Cold solder (used for joining harder materials) and wrong components are the two most common type of production defects on printed circuit boards (PCBs). In a batch of 364 PCBs it
was found that 17 have cold solder defects, 14 have wrong component defects, and 8 have both cold solder and wrong component defects. If a PCB is chosen at random, find the
probability that if a PCB is found to have a cold solder defect, it would also have wrong component defect.
p(B | A).
Here S = {A, B, O), O – others. Thus, p(B | A) = p(B∩A)/p(A) = (8/ 364)/ (17 / 364)=8/17
Problem-6
A box contains 5 defective (that immediately fail when put in use), 10 partially defective (that fail after a couple of hours of use) and 25 acceptable devices. A device is chosen at random
from the box and put into use. If it does not immediately fail, what is the chance it is acceptable?
Solution: S = {defective, partially defective, acceptable}, P(acceptable/not defective) = 25/35= 0.71= 71%.
Problem -7
Let us consider the example of rolling a fair dice twice, let us define the events: A: the first roll shows a 1,
Multiplication Rule for Independent Events: Key words - and, both, altogether.
Problem-8
Let R = event it rains on a given day, and W = event it’s windy. Suppose P(R) = 0.30, P(W) = 0.20, P(R W) = 0.15 ( = probability that it's both rainy and windy). Are these events
independent?
Solution: P(R) P(W) = .06, which is not equal to P(R W). Thus the events are not independent, as we might expect: if it's rainy, it's also likely to be windy.
Problem-9
Consider the experiment of drawing a card from a well-shuffled deck of 52 cards. Let A = A spade is drawn and B = An honor [10, J, Q, K, A] is drawn. Are two events are
independent?
Solution: P(S) = 13/52; P(H) = 20/52 and P(SH)=5/52. Thus, P(SH) = P(S). P(H), so events are independent.
Note what is the probability that random card is an honor? Answer is 20/52.
What is the probability that the card is a spade, this card will be an honor? P(H/S) = 5/13.
Important Note: When it's not clear whether or not two events are independent, use the definition (the multiplication rule) to see if they are, i.e., check to see if P(A B) = P(A) P(B).
Problem-10
Ms. Perez figures that there is a 30 percent chance that her company will set up a branch office in Phoenix. If it does, she is 60 percent certain that she will be made manager of this new
operation. What is the probability that Perez will be a Phoenix branch office manager?
Solution: If we let B denote the event that the company sets up a branch office in Phoenix and M the event that Perez is made the Phoenix manager, then the desired probability is p(B ∩
M), which is obtained as follows: P(B ∩M) = P(B)p(M | B) =0.3x0.6 = 0.18. Hence, there is an 18 percent chance that Perez will be the Phoenix manager.
Practice problems:
1. Samples of a cast aluminum part are classified on the basis of surface finish (in microinches) and length measurements. The results of 100 parts are summarized as follows:
Length
Excellent good
good 10 8
Let A denote the event that a sample has excellent surface finish, and let B denote the event that a sample has excellent length. Determine:
(e) If the selected part has excellent surface finish, what is the probability that the length is excellent?
(f) If the selected part has good length, what is the probability that the surface finish is excellent?
Roundness conforms
yes no
no 12 8
(a) If we know that a shaft conforms to roundness requirements, what is the probability that it conforms to surface finish requirements?
(b) If we know that a shaft does not conform to roundness requirements, what is the probability that it conforms to surface finish requirements?
3. A lot of 100 semiconductor chips contains 20 that are defective. Two are selected randomly, without replacement, from the lot.
(a) What is the probability that the first one selected is defective?
(b) What is the probability that the second one selected is defective given that the first one was defective?
(d) How does the answer to part (b) change if chips selected were replaced prior to the next selection?
4. Disks of polycarbonate plastic from a supplier are analyzed for scratch and shock resistance. The results from 100 disks are summarized as follows:
Shock resistance
high low
low 16 5
Let A denote the event that a disk has high shock resistance, and let B denote the event that a disk has high scratch resistance. Determine the following probabilities:
Recall lecture 1, we talked about with two types of variables: discrete and continuous. These variables which behave in their own natural ways are called random variables. In this lecture,
we will learn about probability distributions associated with discrete random variables. Before we do that, we first try to understand the concept of random variable and its probability
We consider the random experiment of tossing two fair dies. We have already seen that the space for this experiment is S=
Let X denotes a random variable that is defined as the sum of the numbers on the two faces of the dies. We can find the probabilities of different values of X as follows.
p{X =5} =p{(1, 4), (2, 3), (3, 2), (4, 1)} =4/36
p{X = 6} =p{(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)} = 5/36
p{X = 7} =p{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)} = 6/36
p{X = 8} =p{(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)} = 5/36
p{X = 9} =p{(3, 6), (4, 5), (5, 4), (6, 3)} = 4/36
A random variable (r.v.) X is a variable whose value depends on chance, i.e., depends on the outcome of random experiment.
o X is a r.v.: its value depends on the outcome of the roll of the dice.
o The values that X can take are 2, 3, 4, ..., 12.
o Since this is a discrete set of values, X is called a discrete random variable (d.r.v).
Example-2: Keep flipping a fair coin until you get a tail; let N = number of flips.
Definition of a d.r.v.
A r.v. is discrete if its range (the set of values which it can take on) is countable, i.e., either finite or countably infinite.
Let X be a d.r.v. The function f defined by f(x) = p(X=x) is called the probability density function (p.d.f.) of the r.v. X.
1. 0 ≤f(x) ≤1
2. f (x) 1, where the sum is over all values that X can take on.
=
∑
for all x
Problem-1
Flip 3 coins and find the pdf of the no. of heads obtained from the random experiment.
Solution: S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}. All outcomes equally likely each has probability 1/8. Let r.v. X equal the number of heads obtained; its possible
f(1) = p(X=1) = p{HTT, THT, TTH} = 3/8 f(2) = p(X=2) = p{HHT, HHT,
x f(x) 0
1/8
1 3/8
2 3/8
3 1/8
Problem-2
Roll 2 dice and let X = sum of values on faces. Find the pdf of X obtained from the random experiment.
Solution:
p{X =5} =p{(1, 4), (2, 3), (3, 2), (4, 1)} =4/36
p{X = 6} =p{(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)} = 5/36
p{X = 7} =p{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)} = 6/36
p{X = 8} =p{(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)} = 5/36
p{X = 9} =p{(3, 6), (4, 5), (5, 4), (6, 3)} = 4/36
The pdf of X is
X: 2 3 4 5 6 7 8 9 10 11 12
f(x): 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Problem-3
A voice communication system for a business contains 48 external lines. At a particular time, the system is observed and some of the lines are being used. Let the random variable X
denote the number of lines in use. Find the random variable and its associated values.
Solution: X - lines are being used. X can assume any of the integer values 0 through 48. For example when the system is observed, if 10 lines are in use, x = 10.
Problem-4: It is known that the probability of being able to log to a computer from a remote terminal at any given time is 0.7. Let x denote the number of attempts that must be made to
Solution:
X: 1 2 3 4 5 6 …..
Problem-5
Define the random variable X to be the number of contamination particles on a wafer in semiconductor manufacturing.
Solution
The possible values of X are integers from zero up to some large value that represents the maximum number of particles that can be found on one of the wafers.
If this maximum number is very large, we might simply assume that the range of X is the set of integers from zero to infinity.
Problem-6
Four coins are tossed. Find the probability distribution of the number of heads obtained.
Solution
We consider an example of four fair coins tossed. The space for the problem is S=
We define the random variable X as the number of head. Therefore, the possible values for X are 0, 1, 2, 3, and 4. The values of the probabilities are as follows:
X: 0 1 2 3 4
0 0 0
This function adds probability to a certain value of the random variable. It is denoted by F(x ) and is defined as F(x )= = ∑𝑥≤𝑥 𝑓(𝑥). To find the cumulative probability for a random
0 0
variable at a value x , we add the probabilities for all values of the random variable less than and equal to x .
Problem-7
Roll 2 dice and let X = sum of values on faces. Find the cdf of X obtained from the random experiment. Graph the f(x) and F(x) function.
Solution
p{X =5} =p{(1, 4), (2, 3), (3, 2), (4, 1)} =4/36
p{X = 6} =p{(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)} = 5/36
p{X = 7} =p{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)} = 6/36
p{X = 8} =p{(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)} = 5/36
p{X = 9} =p{(3, 6), (4, 5), (5, 4), (6, 3)} = 4/36
The pdf of X is
X: 2 3 4 5 6 7 8 9 10 11 12
f(x): 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
F(x): 1/36 3/36 6/36 10/36 15/36 21/36 26/36 30/36 33/36 35/36 36/36
Problem-8
Suppose that a day’s production of 850 manufactured parts contains 50 parts that do not conform to customer requirements. Two parts are selected at random, without replacement, from
the batch. Let the random variable X equal the number of nonconforming parts in the sample. What is the cumulative distribution function of X?
Solution
The question can be answered by first finding the probability distribution function of X, where X = number of nonconforming parts in the sample and it takes values 0,1,2.
∑ x
−∞
Mathematical expectation is one of the most important concepts in probability and statistics. The importance of this tool cannot be underestimated in mathematical finance, reliability
engineering, quality control, pattern recognition, fuzzy systems and many other fields. Before we understand the concept of mathematical expectation, let us see some places where we
You go to a gas station to buy gasoline. You are at the end of a queue of cars. A natural question that will appear in your mind: How long am I expected to wait?
You go to customer service center of a cell phone operator. While you walk in, you are told that your expected waiting time is 4.3 minutes. How is this number found? What does this
You are in-charge of a production facility for televisions. How long is it expected to produce one television? How much is it expected to cost to produce the television?
All electrical circuits produce electrical noise. You have designed a circuit. How much noise is it expected to produce?
Now, it is a relevant question is: what is mathematical expectation and how is it calculated?
The expected value or expectation of a r.v. X is denoted by E(X) and is defined as the weighted average of all possible values of X, with each value weighted by the probability that value
It is calculated by:
E(X) X.P(X x)
= =
∑
all X
Problem-9
Problem-10
2 2
Variance is calculated by: V(X) = E(X ) – [E(X)] and SD(X) = sqrt(V(X)), where
2 2
E(X ) = X p(X = x)
∑
all X
Problem-11
Solution
Recall problem-9
Face x: 1 2 3 4 5 6
2 2 2 2 2 2 2 2 2
Variance = V(X) = E(X ) –[E(X)] = 1
×(1/6)+ 2 ×(1/6)+ 3 ×(1/6)+ 4 ×(1/6)+ 5 ×(1/6)+ 6 ×(1/6)- 3.5
=15.47-12.25= 3.22
Problem -12
Your friend runs a computer maintenance company. He charges his customers Tk. 4000.00 per year, and performs all maintenance for one year. Past record shows the cost distribution of
Percent: 48 30 14 8
Practice problems
1)
Solution:
To prove that f(x) is a valid probability distribution function, it must satisfy two conditions.
(ii) f (x) 1
=
∑
all x
To prove (i), we observe that the largest value of f(x) is 3/4 (for x = 0), and smallest value of f(x) is 0 (x ). So property ( i) is fulfilled.
f (x) 3 1 1 1
3
= ⎛ + +
= ⎛
1 1
⎞=
2 3
4 4 4 4 4 1 1/ 4
⎜ ⎟ − ⎜ ⎟
∑ ( )
4 3/4
⎝ ⎠ ⎝ ⎠
2 3
1 x x x ...
+ + + + = 1
1
x
−
2
3 1
(a) p(x 2) ⎛ ⎞
= =
0.046875
⎜ ⎟
4 4
⎝ ⎠
1/4
2) A disk drive manufacturer estimates that in five years a storage device with 1 terabyte of capacity will sell with probability 0.5, a storage device with 500 gigabytes capacity will
sell with a probability 0.3, and a storage device with 100 gigabytes capacity will sell with probability 0.2. The revenue associated with the sales in that year are estimated to be $50
million, $25 million, and $10 million, respectively. Let X be the revenue of storage devices during that year. Determine the probability distribution function of X. Determine the
cumulative distribution function for the random variable. Determine the mean and variance of the random variable.
Solution
X: 50 25 10
F(X):
Find
E(X) X.P(X x)
= =
∑
all X
2 2
Variance = V(X) = E(X ) –[E(X)]
Hints:
1 byte=8 bits
1 kilobyte(kb)=1024 bytes
or~1,000,000,000,000,000 bytes
Note that a terabyte is a measure of computer storage capacity. What is the probability computer storage capacity will be 1 terabyte (it is 0.2). Revenue of storage devices for 1 terabyte
3) An optical inspection system is to distinguish among different part types. The probability of a correct classification of any part is 0.98. Suppose that three parts are inspected and
that the classifications are independent. Let the random variable X denote the number of parts that are correctly classified. Determine the probability distribution function of X. Determine
the cumulative distribution function for the random variable. Determine the mean and variance of the random variable.
Solution:
X denotes the number of parts that are correctly classified. Three parts are inspected, so X takes values 0,1,2,3
X: 0 1 2 3
3 2 2 3
p(X=x): 0.02 3×0.02 0.98
×0.98 3×0.02×0.98
F(X):
Find
E(X) X.P(X x)
= =
∑
all X
2 2
Variance = V(X) = E(X ) –[E(X)]
4) In a semiconductor manufacturing process, three wafers from a lot are tested. Each wafer is classified as pass or fail. Assume that the probability that a wafer passes the test is 0.8
and that wafers are independent. Determine the probability distribution function of the number of wafers from a lot that pass the test. Determine the cumulative distribution function for
the random variable. Determine the mean and variance of the random variable.
Solution
X- The number of wafers from a lot that pass the test. Three wafers from a lot are tested. X takes values 0,1,2 and 3.
X: 0 1 2 3
P(X=x):
F(X):
2 2
Variance = V(X) = E(X ) –[E(X)]
5) An assembly consists of two mechanical components. Suppose that the probabilities that the first and second components meet specifications are 0.95 and 0.98. Assume that the
components are independent. Determine the probability distribution function of the number of components in the assembly that meet
specifications. Determine the cumulative distribution function for the random variable. Determine the mean and variance of the random variable.
Solution
Let x be a random variable denoting the number of components in the assembly that meets specification. Furthermore, let A denotes the event that the first component meets specification,
and B denotes the event that the second component meets specification.
Possible values of x are 0, 1 and 2. To find the probability distribution function, we have to find these probabilities.
x 0 1 2
x 0 1 2
Mean =
E(X) X.P(X x)
= =
∑
all X
2 2 2 2 2 2
Variance = V(X) = E(X ) –[E(X)] = 0 =3.79-3.72=0.07.
× 0.001+1 ×0.068+2 ×0.931- (1.93)
6) An assembly consists of three mechanical components. Suppose that the probabilities that the first, second, and third components meet specifications are 0.95, 0.98, and 0.99.
Assume that the components are independent. Determine the probability distribution function of the number of components in the assembly that meet specifications. Determine the mean
Solution
X = The number of components in the assembly that meet specifications. An assembly consists of three mechanical components. X takes values 0, 1, 2, 3
X: 0 1 2 3
P(X=x):
Find
E(X) X.P(X x)
= =
∑
all X
2 2
Variance = V(X) = E(X ) –[E(X)]
7) The time it takes to repair a personal computer is a r.v. whose density in hours is given by
f (x) 0.5, 0 x 2
=⎧ < <
. The cost ($) of the repair depends on the time it takes and is equal to 40 +
0, otherwise
⎩
30 sqrt(x) when the time is x. Compute the expected cost to repair a personal computer.
Solution
We have given cost of the repair depends on time and is equal to 40 + 30 sqrt(x). That means Expected cost = E(C) = E(40 + 30 sqrt(x)) = E(40)+30×E(sqrt(x)) = 40 +
30×sqrt(E(X)) = 40 + 30 ×
sqrt(0.5) = 61.21$.
The following circuit operates only if there is a path of functional devices from left to right. The probability that each device functions is shown on the graph. Assume that
the devices fail independently. What is the probability that the circuit operates?
Solution: Let L and R denote the events that the left and right devices operate. The probability that the circuit operates is: P(L R) = P(L)P(R) = 0.8 0.9 = 0.72.
∩ ×
The following circuit operates only if there is a path of functional devices from left to right. The probability that each device functions is shown. Each device fails
Solution: Let T and B denote the events that the top and bottom devices operate, respectively. There is a path if at least one device operates. The probability that the circuit
operates is
2
P(T or B) = p(T B) = 1- p(T B) = 1- p(T B ) = 1-0.05 = 0.9975
∪ ∪ ′ ′∩ ′
The following circuit operates if and only if there is a path of functional devices from left to right. The probability that each device functions is as shown. Assume that the
probability that a device is functional does not depend on whether or not other devices are functional. What is the probability that the circuit operates?
0 0 0
0. 0. 0.
Solution: To find a solution to the problem of connectivity, let us name the components as follows. In terms of these names, the top branch would operate if all the three
This can be depicted as A B C. Similarly the operation of the bottom branch can be depicted as D E F.
∩ ∩ ∩ ∩
Finally the circuit would operate if either of the two branches operate. This can be indicated by (A B C) (D E F). Since A, B and C are independent.
∩ ∩ ∪ ∩ ∩
A B C
D E F
Practice Problems
1. The following circuit operates if and only if there is a path of functional devices from left to right. The probability each device functions is as shown. Assume that
the probability that a device functions does not depend on whether or not other devices are functional. What is the probability that the circuit operates?
2. This circuit operates only if there is a path of functional devices from left to right. The probability that each device functions is shown. Each device
fails independently.
3. The following circuit operates if and only if there is a path of functional devices from left to right. The probability each device functions is as shown.
Assume that the probability that a device functions does not depend on whether or not other devices are functional. What is the probability that the circuit operates?
Certain types of random variables occur in our real life. This lecture will give us idea about very important special distributions that find extensive use in all Engineering
as follows:
Binomial Distribution
A random variable X is a binomial random variable (b.r.v) if it arises as the result of the following type of process:
(a) Have a fixed number ‘n’ of Bernoulli trials (success or failure for each trials).
(b) The trials are independent, probability of success on each trial is same (as before, denote probability of success as p, probability of failure as 1-p)
(c) X = total number of successes in the n trials (possible values are 0 to n)
In short, X is binomial if it counts the number of successes in n trials. By notation, X~B(n,p) The probability distribution function is defined by
𝒙
() 𝒏 𝒏−𝒙
𝒇 𝒙 = (𝒙) 𝒑 (𝟏 − 𝒑) , x = 0, 1, 2, …, n
Moments:
Problem -1
Suppose take a test in which the probability of getting any one of the questions correct is 0.8. Suppose the test has 20 questions.
Solution: Here X~B(n=20, p=0.8), where X = the number of questions out of the 20 you get correct.
𝒙 𝟐𝟎−𝒙
Binomial model: 𝒇(𝒙) = (𝟐𝟎) 𝟎. 𝟖 (𝟏 − 𝟎. 𝟖) , x = 0, 1, 2, …, 20
𝒙
(i) Expected number of questions will get correct E(X) = np = (20)(0.8)= 16 i.e. you'd expect to get 16 out of the 20 correct.
0
(iii) Probability will get 2 or fewer correct = p(x 2) = f(0) + f(1) + f(2) = (20 (1 −
≤
)
0
20−0 1
0.8) + (20 0.8 20−1 2
(1 − 0.8) + 20 (1 − 0.8) (
20−2
=
) 2
1
20 19 2 18
0.2 +20 0.8 0.2 +190 0.8 0.2 0
× × × × ≈
Problem -2
A binary packet consisting of 64 bits is sent over a communications line. Because of noise, some of the bits will be corrupted when they are sent (i.e., they'll be sent as 1's
or 0's, but will be received as the opposite). Suppose the probability that any 1 bit is corrupted during transmission is p = 0.02.
(ii) What’s the probability the message comes through correctly (i.e., number of bad bits = 0)?
Solution: Here X~B(n = 64,p = 0.02), where X = # of corrupted bits received out of the 64 sent.
𝒙 𝟔𝟒−𝒙
Binomial model: 𝒇(𝒙) = (𝟔𝟒) 𝟎. 𝟎𝟐 (𝟏 − 𝟎. 𝟎𝟐) , x = 0, 1, 2, …, 64
𝒙
(i) Expected number of bad bits in a packet E(X) = np = 64 (0.02) = 1.28 bad bits. Most of times, we would expect 1.28 bits to be corrupted per packet.
×
(iii) Variance = np(1-p)= 1.28 0.98=1.25 bad bits and SD = sqrt(np(1-p)) = sqrt(1.25) = 1.12 bad bits
×
Practice problems
1) An electronic product contains 40 integrated circuits. The probability that any integrated circuit is defective is 0.01, and the integrated circuits are independent.
The product operates only if there are no defective integrated circuits. What is the probability that the product operates?
𝑥 40−𝑥
Binomial model: 𝑓(𝑥) = (40) 0.01 (0.99) , x= 0,1,2, …., 40
0
Probability(product operates): 𝑓(0) = (40
40−0
(Solve it)
0 ) 0.01 (0.99)
2) The phone lines to an airline reservation system are occupied 40% of the time. Assume that the events that the lines are occupied on successive calls are
(a) What is the probability that for exactly three calls the lines are occupied?
(b) What is the probability that for at least one call the lines are not occupied?
(c) What is the expected number of calls in which the lines are all occupied?
𝑥 10−𝑥
Binomial model: 𝑓(𝑥) = (10) 0.40 (0.60) , x= 0,1,2, …., 10
𝑥
3
a) p(x=3) = () 10
10−3
(Solve it)
𝑓 3 = ( 3 ) 0.40 (0.60)
b) p(x 1)= 1-p(x=0) = 1-(10 0 10−0
(Solve it)
≥
0 ) 0.60 (0.40)
c) Expected number of calls: E(X) = np =10 0.40 = 4 calls
×
3) Because not all airline passengers show up for their reserved seat, an airline sells 125 tickets for a flight that holds only 120 passengers. The probability that a
passenger does not show up is 0.10, and the passengers behave independently.
(a) What is the probability that every passenger who shows up can take the flight?
(b) What is the probability that the flight departs with empty seats?
(c) What is the probability that the flight departs with exactly 5 empty seats?
(d) What is the expected number of passengers who will show up?
(e) What is the standard deviation in the number of passengers who will show up?
𝑥 125−𝑥
Binomial model: 𝑓(𝑥) = (125) 0.90 (0.10) , x= 0,1,2, …., 125
a) p(x 120) = 1 – p(x > 120) = 1 – p(x = 121) – p(x=122) – p(x=123) – p(x=124) – p(x=125)
125
=1–( C 121 4 125 122 3 125 123 2
0.9 0.1 C 0.9 0.1 C 0.9 0.1
1 + +
1 1
125
124
124 1 125 125 0
C 0.9 0.1 C 0.9 0.1 )
+
1
(b) Here X = number of empty seats. For the flight to depart with empty seats, x must be less than equal to 119, therefore
p(x 119) = 1 – p(x > 119) = 1 – p(X = 120) – p(X=121) – p(X=122) – p(X=123) – p(1=124) –
125 120 5
p(x=125) = 1 – C 0.9 0.1 0.996 = 0.988
+
1
( )
115 125−115
(c) p(X=115) = 𝑓(𝑥) = (125) 0.90 (0.10) = 0.096
115
d) Expected number of passengers who will show up: E(X) =np = 125 0.90 = 112.5 113 passengers
× ≈
e) Standard deviation in the number of passengers: SD(X) = sqrt(np(1-p)) = 125 0.90 0.10 =
× ×
11.25 11 passengers.
≈
4) A particularly long traffic light on your morning commute is green 20% of the time that you approach it. Assume that each morning represents an independent
trial.
(a) Over five mornings, what is the probability that the light is green on exactly one day?
(b) Over 20 mornings, what is the probability that the light is green on exactly four days?
(c) Over 20 mornings, what is the probability that the light is green on more than four days?
Solution: X~B(n, p=0.20), where X denote the number of mornings the light is green.
5 1 4
(a) Here n = 5 and x = 1. Therefore, p(x 1) C 0.2 (1 0.2) 0.4096
= = − = 1
20 4 16
(b) Here n = 20 and x = 4, Therefore, p(x 4) C 0.2 (1 0.2) 0.2182
= = − = 4
20
1 C 1 2
= − 0 20 20 1 19 20 2 18
0.2 (1 0.2) C 0.2 (1 0.2) C 0.2 (1 0.2)
( 0
3
− 4 + − + − +
20 3 17 20 4 16
= 0.38025 C 0.2 (1 0.2) C 0.2 (1 0.2)
− + −
)
5) A satellite system consists of 4 components and can function adequately if at least 2 of the 4 components are in working condition. If each component is,
independently, in working condition with probability 0.6, what is the probability that the system functions adequately?
Binomial model: 𝑥
= 4) 0.6 4−𝑥
𝑓(𝑥) (0.40) ( , x= 0,1,2,3,4
𝑥
Here probability that the system functions adequately = p(X 2) = 1- p(X=0) - p(X=1) = 1-
≥
0 1
(4) 0.6 4−0 4) 0.6 4−1
(0.40) (0.40) -( (Solve it)
0 1
6) A trading company has eight computers that it uses to trade on the New York Stock Exchange (NYSE). The probability of a computer failing in a day is 0.005, and
the computers fail independently. Computers are repaired in the evening and each day is an independent trial. What is the probability that all eight computers fail in a day?
Binomial model: 𝑥
= 8) 0.005 8−𝑥
𝑓(𝑥) (0.995) ( , x= 0,1,2,…., 8
𝑥
8
Find () 8
8−8
(Solve it)
𝑓 8 = (8) 0.005 (0.995)
7) A multiple choice test contains 25 questions, each with four answers. Assume a student just guesses on each question.
(a) What is the probability that the student answers more than 20 questions correctly?
(b) What is the probability the student answers less than 5 questions correctly?
𝑥 25−𝑥
Binomial model: 𝑓(𝑥) = (25) 0.25 (0.75) , x= 0,1,2,…., 25
8) An electronic scale in an automated filling operation stops the manufacturing line after three underweight packages are detected. Suppose that the probability of an
underweight package is
(a) What is the mean number of fills before the line is stopped?
(b) What is the standard deviation of the number of fills before the line is stopped?
Solution: X~B(3, 0.001), where X presents number of fills before the line is stopped
a) Mean number of fills before the line is stopped: E(X) = np (Solve it)
b) SD number of fills before the line is stopped: SD(X) = sqrt(np(1-p)) (Solve it)
9) The probability that your call to a service line is answered in less than 30 seconds is 0.75. Assume that your calls are independent.
(a) If you call 10 times, what is the probability that exactly 9 of your calls are answered within 30 seconds?
(b) If you call 20 times, what is the probability that at least 16 calls are answered in less than 30 seconds?
(c) If you call 20 times, what is the mean number of calls that are answered in less than 30 seconds?
9
a) Here X~B(10,p=0.75), find () 10
10−9
(Solve it)
𝑓 9 = ( 9 ) 0.75 (0.25)
b) Here X~B(20,p=0.75), find p(x 16) (Solve it)
≥
c) Here X~B(20,p=0.75), find mean number of calls that are answered in less than 30 seconds E(X) = np (Solve it).
Geometric distribution
A random variable X is a geometric random variable if it arises as the result of the following type of process:
1. Have an infinite series of trials; on each trial, result is it is either success or failure.
2. The trials are independent, and the probability of success is same on each trial. (The probability of success in each trial will be denoted p and the
probability of failure will be 1 - p.)
3. X represents the number of trials until the first success.
In short, a random variable is geometric if it "counts the number of trials until the first success”. By notation X~G(n), n = number of trials i.e. how many trials is needed
𝒙−𝟏
𝒇(𝒙) = 𝒒 𝒑, x = 1, 2, …, where p = probability of success, q=1-p = probability of failure. Moments:
2 2
Expected value = E(X) = 1/p, Variance = q/p , SD = sqrt(q/p )
x
F(x) = 1 - (1 - p)
Problem -1
Random digits are integers selected from among {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} one at a time in such a way that at each stage in the selection process the integer chosen is just
as likely to be digit as any other. In generating such a series, let X denote the number of trials needed to obtain the first zero. Find pdf and cdf. Find mean, variance and
Solution: X denotes the number of trials needed to obtain the first zero, X is a geometric random variable. with probability of zero is p = 1/10.
x-1
pdf: f(X) = (1-p) p, x = 1, 2, 3, .....
x-1
f(X) = (9/10) (1/10), x = 1, 2, 3, ....
[x]
cdf: F(X) = 1 – (0.9) .
2 2
Expected value = E(X) = 1/p = 10 Variance = q/p =(1-p)/ p =0.90/0.01 =
2
90 SD = sqrt(q/p ) = sqrt(90) = 9.48
Problem–2
It is known that the chance of being able to log on to a computer from a remote terminal at any given time is 0.6. Let X denotes the number of attempts that must be made
to gain access to the computer. Find pdf and cdf.
Problem 3
The probability that a wafer contains a large particle of contamination is 0.015. If it is assumed that the wafers are independent, what is the probability that exactly 125
Solution: Let X denote the number of samples analyzed until a large particle is detected. Then X
124
is a geometric random variable with p = 0.015. The requested probability is p(x = 125) = (0.985) 0.015 = 0.0023
Practice problems
1) The probability of a successful optical alignment in the assembly of an optical data storage product is 0.8. Assume the trials are independent.
(b) What is the probability that the first successful alignment requires exactly four trials?
(c) What is the probability that the first successful alignment requires at most four trials?
(d) What is the probability that the first successful alignment requires at least four trials?
(a) Probability first alignment is successful = p(X=1) = 0.8 (b)Here x = 4. Therefore, p(x = 4) =
0.2×0.2×0.2×0.8 = 0.0064
= 0.8 + 0.20 × 0.8 + 0.2 × 0.2 × 0.8 + 0.2 × 0.2 × 0.2 × 0.8 = 0.998
(d ) Here x 4. Therefore
2) Assume that each of your calls to a popular radio station has a probability of 0.02 of connecting, that is, of not obtaining a busy signal. Assume that your calls are
independent.
(a) What is the probability that your first call that connects is your tenth call?
(b) What is the probability that it requires more than five calls for you to connect?
𝑥−1
Solution: X~G(0.02), where X presents number of calls until connection Geometric model: 𝑓(𝑥) = 0.02 × 0.98 , x= 1,2,3,
……
10−1
a) p(x=10) = 𝑓(10) = 0.020 × 98 =0.0167
b) p(x>5) = 1 - p(x 5) = 1- p(x=1)-p(x=2) - p(x=3) - p(x=4) - p(x=5) = 1- 0.02 -(0.02 0.98)
≤ ×
2 3 4
– (0.02 0.98 ) – (0.02 0.98 ) – (0.02 0.98 ) = 0.904
× × ×
3) A particularly long traffic light on your morning commute is green 20% of the time that you approach it. Assume that each morning represents an independent
trial.
(a) What is the probability that the first morning that the light is green is the fourth morning that you approach it?
(b) What is the probability that the light is not green for 10 consecutive mornings?
𝑥−1
Solution: X~G(p=0.20), X = Number of mornings until first green Geometric model: 𝑓(𝑥) = 0.2 × 0.8 , x= 1,2,3,
……
4-1
a) p(x=4) = 0.2 0.8 =0.1024
×
x 10 x
b) p(x>10)= 1-p(x 10) = 1-[1-(1-p) ] = 1-[1-0.8 ] = 0.1074 [ We know cdf of the geometric distribution is F(x) = 1 - (1 - p) ]
≤
4) A trading company has eight computers that it uses to trade on the New York Stock Exchange (NYSE). The probability of a computer failing in a day is 0.005, and
the computers fail independently. Computers are repaired in the evening and each day is an independent trial.
(a) What is the mean number of days until a specific computer fails?
(b) What is the mean number of days until all eight computers fail in the same day? Solution: X~G(0.005), X presents number of days until a
specific computer fails Mean number of days until a specific computer fails: E(X) = 1/p = 1/0.005 = 200 days
8 8
Mean number of days until all eight computers fail in the same day = 1/p = 1/(0.005) [ probability of failure is 0.005 because all eight computers are independent]
5) The probability that your call to a service line is answered in less than 30 seconds is 0.75. Assume that your calls are independent.
(a) What is the probability that you must call four times to obtain the first answer in less than 30 seconds?
(b) What is the mean number of calls until you are answered in less than 30 seconds?
Solution: X~G(0.75), X presents number of calls needed to obtain an answer in less than 30 seconds
𝑥−1
Geometric model: 𝑓(𝑥) = 0.75 × 0.25 , x= 1,2,3,……
4−1
a) p(x=4) = f(4) = 0.75 × 0.25 = 0.011
b) Mean number of calls until answered in less than 30 seconds: E(X) = 1/p = 1/0.75 = 1.33 1 call.
≈
Poisson distribution
Poisson distribution is an approximation of binomial distribution when sample size is very large; in fact when n . To derive the expression for Poisson probability
→∞
5. The number of α-particles discharged in a fixed period of time from some radioactive particle.
Moments:
Expected value = E(X) = , variance = and SD = sqrt( ). Note that for a Poisson distribution mean and variance are same and it is equal to .
λ λ λ λ
Problem -1
Suppose that the average number of accidents occurring weekly on a particular stretch of a highway equals 3. Calculate the probability that there is at least one accident
this week.
Solution: Let X denote the number of accidents occurring on the stretch of highway in question during this week. Because it is reasonable to suppose that there are a
large number of cars passing along that stretch, each having a small probability of being involved in an accident, the number of such accidents should be approximately
Problem -2
Consider an experiment that consists of counting the number of α particles given off in a one- second interval by one gram of radioactive material. If we know from
past experience that, on the average, 3.2 such α-particles are given off, what is a good approximation to the probability that no more than 2 α-particles will appear?
Solution: If we think of the gram of radioactive material as consisting of a large number n of atoms each of which has probability 3.2/n of disintegrating and sending off
an α- particle during the second considered, then we see that, to a very close approximation, the number of α-particles given off will be a Poisson random variable with
Problem -3
If there are 500 customers per eight-hour day in a check-out lane, what is the probability that there will be exactly 3 in line during any five-minute period?
Solution: The expected value during any one five minute period would be λ = 500 / 96 = 5.2083333. Here X~p(λ=5.2083333). We want to know the probability of getting
-5.2083333 3
exactly 3. Thus, p(x=3; λ= 5.2083333) = {e (5.2083333) } / 3! = 0.1288 (approx).
×
Problem -4
A computer terminal can pick up an erroneous signal from the keyboard that does not show up on the screen. This creates a silent error that is difficult to detect. Assume
that for a particular keyboard the chance that this will occur per entry is 1/1000. In 12,000 entries find the chance that 3 silent errors occur. What about at least 2 silent
error occurs?
Since n is large and p is too small, use Poisson distribution instead of binomial distribution
𝑒−12123
Hence, X ~ Poisson(λ=np = 12). Find p(X=3) = = 0.001
3!
𝑒−12120 𝑒−12121
p(at least 2 silent error occurs) = p(x 2) = 1-p(x=0) – p(x=1) = 1- - (Solve it)
≥
0! 1!
Practice problems
1) The number of telephone calls that arrive at a phone exchange is often modeled as a Poisson random variable. Assume that on the average there are 10 calls per
hour.
(a) What is the probability that there are exactly 5 calls in one hour?
(b) What is the probability that there are 3 or less calls in one hour?
(c) What is the probability that there are exactly 15 calls in two hours?
(d) What is the probability that there are exactly 5 calls in 30 minutes?
c) Here X~Poisson(λ=2 10=20), X presents number of telephone calls two hours. Find p(x=15) (Solve it)
×
d) Here X~Poisson(λ=10/2=5), X presents number of telephone calls 30 minutes. Find p(x=5) (Solve it)
2) The number of defects in bolts of cloth in textile manufacturing is assumed to be Poisson distributed with a mean of 0.1 defect per square meter.
(a) What is the probability that there are two defects in 1 square meter of cloth?
(b) What is the probability that there is one defects in 10 square meters of cloth?
(c) What is the probability that there are no defects in 20 square meters of cloth?
(d) What is the probability that there are at least two defects in 10 square meters of cloth?
Solution: X~Poisson(λ=0.1), where X presents the number of defects in bolts of cloth in textile manufacturing per square meter
3) When a computer disk manufacturer tests a disk, it writes to the disk and then tests it using a certifier. The certifier counts the number of missing pulses or errors.
The number of errors on a test area on a disk has a Poisson distribution with = 0.2.
λ
Solution: X~Poisson(λ=0.2), where number of errors per test area a) E(X) = λ=0.2
b) Find p(x 2) using X~Poisson(λ=0.2) (Solve it)
≤
4) The number of cracks in a section of interstate highway that are significant enough to require repair is assumed to follow a Poisson distribution with a mean of two
(a) What is the probability that there are no cracks that require repair in 5 miles of highway?
(b) What is the probability that at least one crack requires repair in mile of highway?
(c) What is the expected number of cracks in 5 miles, and the standard deviation in the number of cracks in 5 miles.
(d) What is the probability that there is at least one crack that requires repair in 5 miles of highway?
(e) What is the probability that there are 3 cracks in one mile of highway?
5) The number of messages sent to a computer bulletin board is a Poisson random variable with a mean of 5 messages per hour.
(b) What is the probability that 10 messages are received in 1.5 hours?
(c) What is the probability that less than two messages are received in one-half hour?
6) A manufacturer of a consumer electronics product expects 2% of units to fail during the warranty period. A sample of 500 independent units is tracked
(a) What is the probability that none fails during the warranty period?
(b) What is the expected number of failures during the warranty period?
(c) What is the probability that more than two units fail during the warranty period?
Solution: X~B(n=500, p = 0.02), X presents number of electronics product failures during the warranty period
Since n is large and p is too small, use Poisson distribution instead of binomial distribution Hence, X ~ Poisson(λ=np = 10).
The negative binomial distribution is a distribution that can be thought of as ‘reverse’ of the binomial distribution. In binomial distribution, the number of trials, n, is fixed,
and the number of successes, x, is a variable. We essentially look for the probability of x successes in n trials.
In negative binomial distribution, the number of successes is fixed, and we look for the number of trials that would be needed to obtain the success. Therefore, the number
of success, r, is kept fixed; and the number trials, x, is made a variable. The characteristics are:
The experiment consists of a series of independent and identical Bernoulli trial, each with a probability of success p;
The trials are observed until exactly r successes are obtained, where r is fixed by the experimenter;
𝑓(𝑥) 𝑥 − 1
𝑥−𝑟 𝑟
) (1 − 𝑝) 𝑝 , x = 1, 2, 3,…….
= (𝑟 − 1
By notation, X~NB(x, r), where x= number of trials to obtain r successes and r= number of successes
Several important observations can be made from here: The experiment would always end with a
success;
There would be exactly r – 1 successes in the previous x – 1 trials, in any combination; There would be exactly x – r failures in x – 1 trials.
Moments
2 2
Mean = r/p, Variance = r(1-p)/p , SD = sqrt(r(1-p)/p )
Problem-1
Cotton linters used in the production of solid rocket propellants are subjected to a nitration process that enables the cotton fibers to go into the solution. The process is
90% effective in that the materials produced can be shaped as desired in a later processing stage with probability 0.9. What is the probability that exactly 20 lots will be
produced in order to obtain the third defective lot? Find mean, variance and SD of the above random variable.
Solution: X~NB(x=20, r =3), where ‘success’ is obtaining a defective lot and hence p = 0.1 and
r = 3. Thus,
𝑥−𝑟 𝑟
Model: 𝑓(𝑥) = (𝑥 − 1) (1 − 𝑝) 𝑝 , x = 1, 2, 3,…….
𝑟−1
( ) 𝑥−1 𝑥−𝑟 𝑟
19 17 3
Mean = r/p = 3/0.1= 30. The expected value is 30 meaning that on an average 30 trials would be required to produce the third defective lot.
2 2
Variance = r(1-p)/p = (3 0.9)/0.1 = 270.
×
2
SD = sqrt(r(1-p)/p )= sqrt(270) = 16.43. To produce the third defective lot every time will not be needed 30 trials.
Practice problems
1) The probability of a successful optical alignment in the assembly of an optical data storage product is 0.8. Assume the trials are independent. What is the
probability that exactly three trials are required to achieve two successful alignments?
Solution: X∼NB (x=3,p=0.8 ), where X = Number of trials until a second successful alignment.
𝑟−1
Model: 𝑥 − 1𝐶 𝑟 𝑥−𝑟
𝑝 1−𝑝 , r = 1,2,3,…..
𝑟−1
Find p(r=2). Here p(r=2) = 𝑥 − 1𝐶 𝑟 𝑥−𝑟
𝑝 1−𝑝 = 2 (0.64) (0.2)=0.256.
2) Assume that each of your calls to a popular radio station has a probability of 0.02 of connecting, that is, of not obtaining a busy signal. Assume that your calls are
independent.
(a) What is the probability that a man connect twice in a sample of size 5 calls?
(b) Suppose that both you and a friend are calling the radio station. Compute the probability that the number of calls required for you both to connect is greater
than 5.
Solution:
(a) Here n = 5, p = 0.02, 1-p = 0.98, X~B(n=5, p=0.02). Find P(X=2) = 0.0038
(b) Negative Binomial, with r =2 connections and p =0.02 where "success" = “a call connects" and X="number of calls until rth connection". Find by negative binomial
P(X>5).
3) A particularly long traffic light on your morning commute is green 20% of the time that you approach it. Assume that each morning represents an independent
trial. What is the probability that no more than 2 green lights will be observed among the first 3 mornings?
rd
Solution: X~NB(x=3, p=0.20), X: # of mornings to observed the 3 green light. Find P(X 2).
≤
4) Bob is a high school basketball player. He is a 70% free throw shooter. That means his probability of making a free throw is 0.70. During the season, what is the
probability that Bob makes his third free throw on his fifth shot?
Solution: The probability of success (p) is 0.70, the number of trials (x) is 5, and the number of successes (r) is 3. Here X~ NB(x; r, p) i.e. X ~ NB(5; 3, 0.7)
The probability that Bob will make his third successful free throw on his fifth shot is 18%.
5) Find the probability that a man flipping a coin gets the fourth head on the ninth flip.
Solution: Here, Number of trials x = 9 (because we flip the coin nine times). Number of successes r = 4 (since we define heads as a success). Probability of success for
The probability that the coin will land on heads for the fourth time on the ninth coin flip is 11%
6) The probability that your call to a service line is answered in less than 30 seconds is 0.75. Assume that your calls are independent.
(a) What is the probability that you must call six times in order for two of your calls to be answered in less than 30 seconds?
(b) What is the mean number of calls to obtain two answers in less than 30 seconds?
Solution
𝑟−1
Find p(r=2) using 𝑥 − 1𝐶 𝑟 𝑥−𝑟
𝑝 1−𝑝 with x=6, p=0.75 and r=2
b) Mean number of calls to obtain two answers in less than 30 seconds: E(X) = r/p
Hypergeomeric distribution
First, an item can be selected, inspected, and returned to the population for possible reselection. In the second way, the item can be set aside so that it is no longer selected.
The former is called sampling with replacement, and the latter is called sampling without replacement.
In case sampling without replacement, the draws are not independent, hence are not binomial process. Rather, it follows a distribution known as hypergeometric
distribution.
The experiment consists of drawing a random sample of size n, without replacement, from a collection of N objects;
The random variable x is the number of objects in the sample which are of interest to us.
Moments:
SD = sqrt(variance)
Problem-1
The components of a 6-component system are to be randomly chosen from a bin of 20 used components. The resulting system will be functional if at least 4 of its 6
components are in working condition. If 15 of the 20 components in the bin are in working condition, what is the probability that the resulting system will be functional?
Solution: X~hyper(N=20, n=6, r =15), X presents number of components are working condition
Practice problems
1) Printed circuit cards are placed in a functional test after being populated with semiconductor chips. A lot contains 140 cards, and 20 are selected without
(a) If 20 cards are defective, what is the probability that at least 1 defective card is in the sample?
(b) If 5 cards are defective, what is the probability that at least 1 defective card appears in the sample?
Solution: X~hyper(N=140,n=20,r=20), where X presents number of defective cards among 20 selected cards
Model: , x=1,2,…,n
(20)(120)
0 20
a) P(x 1) = 1-p(x=0) = 1-f(0) = 1- =0.9644
≥
(140)
20
5 135
0 ( )( 20
b) P(x 1) = 1-p(x=0) = 1-f(0) = 1- =0.5429
≥
(140)
20
2) Magnetic tape is slit into half-inch widths that are wound into cartridges. A slitter assembly contains 48 blades. Five blades are selected at random and evaluated
each day for sharpness. If any dull blade is found, the assembly is replaced with a newly sharpened set of blades.
(a) If 10 of the blades in an assembly are dull, what is the probability that the assembly is replaced the first day it is evaluated?
(b) If 10 of the blades in an assembly are dull, what is the probability that the assembly is not replaced until the third day of evaluation? [ Hint: Assume the daily
(c) Suppose on the first day of evaluation, two of the blades are dull, on the second day of evaluation six are dull, and on the third day of evaluation, ten are dull.
the assembly is not replaced until the third day of evaluation? [Hint: Assume the daily decisions are independent.
(10)(38)
3) A state runs a lottery in which 6 numbers are randomly selected from 40,without replacement. A player chooses 6 numbers before the state’s sample is selected.
(a) What is the probability that the 6 numbers chosen by a player match all 6 numbers in the state’s sample?
(b) What is the probability that 5 of the 6 numbers chosen by a player appear in the state’s sample?
(c) What is the probability that 4 of the 6 numbers chosen by a player appear in the state’s sample?
(d) If a player enters one lottery each week, what is the expected number of weeks until a player matches all 6 numbers in the state’s sample?
Solution: X~hyper(N=40,n=6,r=6)
6 34
C C −
6 0 7
(a) p(x 6) 2.6 10
= = = ×
40
6 C
6 34
C C −
5 1 5
(b) p(x 5) 5.31 10
= = = ×
40
6 C
6 34
C C −
4 2 3
(c) p(x 4) 2.192 10
= = = ×
40
6 C
(d) Here, X~G(p=2.6 × 10 7 ). Expected number of weeks for success = 1/p=
We discussed the way to handle discrete probability distributions and some useful discrete distributions. In this lecture, we will do a similar exercise for continuous
variables. Because of the discrete nature of the variable, where needed, we performed a discrete summation in discrete distribution. But in case of continuous variable, a
discrete summation is not possible. We will require performing a continuous summation – i.e. integration – in case of continuous variable.
Recall a random variable (r.v.) X is a variable whose value depends on chance, i.e., depends on the outcome of some experiment. Use capital letters to denote r.v. and their
i.e., the probability that X lies between a and b is the area under the graph of f (x) from a to b.
The density function for a c.r.v. must satisfy the following properties: Property 1: f(x) 0 for all x
Property 2:
Property 3:
Example-1
Let T = Time of the peak demand for electricity at a power plant, is different from the others
o Time is measured continuously and T can take on any value in the interval [0, 24) (for example, 0 denotes 12 midnight one day and 24
denotes 12 midnight the next)
o Since there is a continuum of possible values, T is called a c.r.v.
Example 2
Let R = number of inches of rainfall received at Dhaka city on a given day in a month.
o R can take on any value in the interval [0, 10] (for example, 3.0", 1.257", etc.)
o Since there is a continuum of possible values, R is called a continuous random variable (c.r.v.).
The idea of cumulative distribution function in continuous case is very useful. It is defined exactly as in the discrete case, although found by integration rather than
summation. In case of continuous variable, cumulative distribution of a probability density function f(t), F(x), is defined as
𝑥
−𝖺
In this section we define the expected values of a continuous probability density function. We would also other quantities related with the expected values, such as mean,
variance. The definition of expected value in case of continuous variable parallels that of discrete variable with the summation operation replaced by integration.
In case of a continuous density function f(x), the expected value, variance and SD is defined as
F(x) = f (x)
∫
−∞
f (x)
d
=
F
(
x
)
d
x
Problem
(i) Verify the probability conditions with the given probability function
(ii) Find the probability p(0.2<x<0.3).
(iii) Find the cumulative distribution function.
(iv) Calculate expected value, variance and standard deviation.
Solution:
(i) We can verify the properties (1) and (3) above with this function. The function is always positive in the given range of existence, i.e.
between x = 0.1 to 0.5.
(ii)
(iii)
(iv)
Practice problems: 1.
2)
3) Determine the cumulative distribution function for the distribution in practice problem 1.
4) Suppose f(x) = 0.125x for 0 < x < 4. Determine the mean and variance of X.
2
5) Suppose f(x) = 1.5x for –1 < x < 1. Determine the mean and variance of X.
6) Suppose that contamination particle size (in micrometers) can be modeled as f(x)
3
= 2x for 1 < X. Determine the mean of X.
A random variable x is said to be continuous uniformly distributed over the interval ( , ) if its probability density function is given by
αβ
It is denoted by CU( , ).
αβ
−𝖺
2
SD= = sqrt( )
σ σ
Problems
1. The thickness of a flange on an aircraft component is uniformly distributed between 0.95 and
1.05 millimeters.
(a) Determine the cumulative distribution function of flange thickness.
(b) Determine the proportion of flanges that exceeds 1.02 millimeters.
(c) What thickness is exceeded by 90% of the flanges?
(d) Determine the mean and variance of flange thickness.
0.95 1.05−0.95
= 10(X-0.95) ∫
b) P(x>1.02) = 1.05 1
𝑑𝑥=10(1.05-1.02) = 0.3 =3%
1.02 1.05−0.95
∫
= 1 - p(X<x) = 0.90
= p(X<x) = 0.10
10(X-0.95) = 0.10 x = 0.96 millimeter
⇒ ∴
(d) Solve it
2. Suppose the time it takes a data collection operator to fill out an electronic form for a database is uniformly between 1.5 and 2.2 minutes.
(a) What is the mean and variance of the time it takes an operator to fill out the form?
(b) What is the probability that it will take less than two minutes to fill out the form?
(c) Determine the cumulative distribution function of the time it takes to fill out the form.
Solution: X~CU(1.5,2.2), X presents time takes a data collection operator to fill out an electronic form
2 2
a) Mean = (1.5+2.2)/2 = 1.85 minute, variance = (2.2-1.5) /12=0.0408 minute
2.0 1
b) p(x<2) = 𝑑𝑥 (solve it)
1.5 2.2−1.5
∫
c) F(x) = p(X<x) = 𝑥 1
𝑑𝑥 = 1.42 𝑥
𝑑𝑥 = 1.42(x-1.5)
1.5 2.2−1.5 1.5
∫ ∫
3. The probability density function of the time required to complete an assembly operation is f(x)
= 0.1 for 30 < x < 40 seconds.
(a) Determine the proportion of assemblies that requires more than 35 seconds to complete.
(b) What time is exceeded by 90% of the assemblies?
(c) Determine the mean and variance of time of assembly.
= 1 - p(X<x) = 0.90
4) The thickness of photoresist applied to wafers in semiconductor manufacturing at a particular location on the wafer is uniformly distributed between 0.2050 and
0.2150 micrometers.
(a) Determine the cumulative distribution function of photoresist thickness.
(b) Determine the proportion of wafers that exceeds 0.2125 micrometers in photoresist thickness.
(c) What thickness is exceeded by 10% of the wafers?
(d) Determine the mean and variance of photoresist thickness.
2. Exponential Distribution
It is denoted by X~EXP( ).
β
−𝑥/𝛽
The cumulative distribution function (cdf): F(x) = 1 –𝑒
2
Mean = , variance = and SD =
β β β
Memory less property of exponential distribution: p(x > s + t | x > s) = p(x > t)
Problems
1. Defective parts are produced at a factory on an average every 5.3 minutes. If it is assumed that the time between the productions of two defective parts follow an
exponential distribution, find the probability
(a) Time between the productions of two defective item would be less than 3.5 minutes,
(b) Time between the productions of two defective items would be more than 2 minutes,
(c) Time between the productions of two defective items would be between 2.5 to 4.5 minutes.
Solution: X~EXP( =5.3), X presents time between production of two defective parts are produced at a factory
β
−𝑥/𝛽 −3.5/5.3 −0.66
a) p(X<3.5) = F(3.5) = 1–𝑒 = 1–𝑒 = 1–𝑒 = 0.52 = 52%
−2/5.3 −0.37
b) p(X>2) =1-P(X<2) = 1-F(2) = 1-1+𝑒 =𝑒 = 0.70 = 70%
−4.5/5.3 −2.5/5.3 −4.5/5.3 −2.5/5.3 −0.47
c) p(2.5<X<4.5) = F(4.5) - F(2.5) = 1-𝑒 - (1-𝑒 )= - 𝑒 +𝑒 =𝑒 -
−0.84
𝑒 = 0.62 - 0.43 = 0.19 = 19%
2. The waiting time at gas stations is assumed to follow an exponential distribution. At a particular gas station, the average waiting time is 3.8 minutes. Find the
probability of
(a) the waiting time would be more than 1 minute,
(b) the waiting time would be more than 2 minutes,
(c) the waiting time would be more than 3 minutes
(d) the waiting time would be more than 3 minutes, given that the waiting time is more than 2 min.
3. The time between arrivals of taxis at a busy intersection is exponentially distributed with a mean of 10 minutes.
(a) What is the probability that you wait longer than one hour for a taxi?
(b) Suppose you have already been waiting for one hour for a taxi, what is the probability that one arrives within the next 10 minutes?
(c) Determine x such that the probability that you wait more than x minutes is 0.10.
(d) Determine x such that the probability that you wait less than x minutes is 0.90.
(e) Determine x such that the probability that you wait less than x minutes is 0.50.
1- p(X<x) = 0.10
⇒
p(X<x) = 0.90
⇒
𝑥
−
10
1 –𝑒 = 0.90
⇒
𝑥
−
10
𝑒 = 0.10
⇒
-(x/10) = -1
⇒
x = 10 minute
∴
4. Cars arrive at a toll plaza at a rate of 6.5cars/min and are assumed to follow Poisson distribution.
Find the probability that
(a) In any given minute 4 to 6 cars will arrive;
(b) gap between two successive arrivals is less than 15 secs.
5. Suppose that the log-ons to a computer network follow a Poisson process with an average of 3 counts per minute.
(a) What is the mean time between counts?
(b) What is the standard deviation of the time between counts?
(c) Determine x such that the probability that at least one count occurs before time x minutes is 0.95.
a) Mean time between counts = 3 minute (because Mean = for exponential distribution )
β
b) SD of the time between counts = sqrt(3) = 1.73 minute (because SD =sqrt( )for exponential distribution)
β
Note that alternatively, this problem could be solved using the Poisson distribution.
Let X be the number of log-ons during the time interval [0,x]. Then X has a Poisson distribution with mean λx=3x.
x
The Poisson pdf is f(X) = e λ /x!, thus P(X=0)=e 3x . Solve to obtain x=0.9986 minute.
6. The time between calls to a plumbing supply business is exponentially distributed with a mean time between calls of 15 minutes.
(a) What is the probability that there are no calls within a 30-minute interval?
(b) What is the probability that at least one call arrives within a 10-minute interval?
(c) What is the probability that the first call arrives within 5 and 10 minutes after opening?
(d) Determine the length of an interval of time such that the probability of at least one call in the interval is 0.90.
−
15
a) p(x<30) = F(30) = 1-𝑒 (Solve it).
Note that we are not caring number of calls it will be considered for Poisson distribution. Also Poisson random variable is a discrete random variable.
10
−
15
(b) p(x<10) = F(10) = 1-𝑒 (Solve it).
15 05
- (1-𝑒
(c) P(5<x<10) = F(10) –F(5) = 1-𝑒 − 15
) (Solve it).
(d) Find x. Here p(X>x) = 0.90
1-p(X<x) = 0.90 (Solve for x)
⇒
7. The time to failure (in hours) of fans in a personal computer can be modeled by an exponential distribution with β = 3000 hours.
(a) What proportion of the fans will last at least 10000 hours?
(b) What proportion of the fans will last at most 7000 hours?
Solution: X~EXP(3000 hours), X presents time to failure (in hours) of fans in a personal computer
a) p(x 10000) (Solve it).
≥
8. The distance between major cracks in a highway follows an exponential distribution with a mean of 5 miles.
(a) What is the probability that there are no major cracks in more than 10-mile stretch of the highway?
(b) What is the probability that there are two major cracks in more than 10-mile stretch of the highway?
(c) What is the standard deviation of the distance between major cracks.
(d) What is the probability that the first major crack occurs between 12 and 15 miles of the start of inspection?
(e) What is the probability that there are no major cracks in more than two separate 5-mile stretches of the highway?
(f) Given that there are no cracks in more than first 5 miles inspected, what is the probability that there are no major cracks in the next 10 miles inspected?
Solution: X~EXP(5 miles), where X presents distance between major cracks in a highway a) p(x>10) = 1-p(X<10) = 1-F(10) = 0.1353 (Solve it)
b) p(x>10) (Check it)
2
c) SD = sqrt(5 miles ) = 2.33 miles
d) p(12<x<15) = F(15) – F(12) (Solve it)
9. The time between the arrivals of electronic messages at your computer is exponentially distributed with a mean of two hours.
(a) What is the probability that you do not receive a message during a two-hour period?
(b) If you have not had a message in the last four hours, what is the probability that you do not receive a message in the next two hours?
(c) What is the expected time between your fifth and sixth messages?
10. The lifetime of a mechanical assembly in a vibration test is exponentially distributed with a mean of 400 hours.
(a) What is the probability that an assembly on test fails in less than 100 hours?
(b) What is the probability that an assembly operates for more than 500 hours before failure?
(c) If an assembly has been on test for 400 hours without a failure, what is the probability of a failure in the next 100 hours?
(d) If 10 assemblies are tested, what is the probability that at least one fails in less than 100 hours? Assume that the assemblies fail independently.
(e) If 8 assemblies are tested, what is the probability that all have failed by 800 hours? Assume the assemblies fail independently.
(Solve it)
e) Here X~B(n=8, p = p(X<800). Find p using X~EXP(400). Then find p(x=8) using binomial distribution.
(Solve it)
3. Normal distribution
The normal distribution is a distribution that underlies many of the statistical methods used in data analysis. This distribution was first describes by de Moivre in 1733 as
being the limiting form of binomial distribution with the number of trials approaching infinity. This was again described by Laplace and Gauss about half century later as
they were trying to models errors in astronomical measurements. This distribution is often referred to a ‘Gaussian’ distribution.
1 −2( 𝜎 )
𝑓(𝑥) = 𝑒 , - <x< , - < < , 0
√2𝜋𝜎2 ∞ ∞ ∞ μ ∞ σ≥
is said to have a normal distribution with mean and standard deviation . It is denoted by N( , ).
μ σ μσ
Standard normal
It can be observed that the normal distribution depends upon the mean and standard deviation of the random variable. It is also understood that there are infinite
μ σ
possibilities of both the mean and the standard deviation. This means that it would be necessary to perform a separate integration for each set of mean and standard
deviation. To avoid this situation, we perform a transformation on the normal distribution using
𝑧=�
This transformation converts all normal distribution into another normal distribution with mean 0 and standard deviation 1. The new variable z is called the standard
normal. The standard normal denotes the variation from the mean in terms of the standard deviation. For example, if a particular value of the random variable x, suppose
0 0 0 0
x , corresponds to a standard normal z , this means that the value x is z standard deviations away from the mean of the random variable x.
2
Mean = , variance = and SD =
μ σ σ
Problems
1. The compressive strength of samples of cement can be modeled by a normal distribution with a mean of 6000 kilograms per square centimeter and a standard
deviation of 100 kilograms per square centimeter.
2
(a) What is the probability that a sample’s strength is less than 6250 Kg/cm ?
2
(b) What is the probability that a sample’s strength is between 5800 and 5900Kg/cm ?
(c) What strength is exceeded by 95% of the samples?
𝑥−𝜇 6250−6000
Solution: X~N(6000,100), X represents compressive strength of samples of cement a) p(x<6250) = p( < = p(z<2.5) = 0.9938 = 99%
𝜎 100
5800−6000 𝑥−𝜇 5900−6000
b) p(5800<x<5900) = p( < < ) = p(-2<z<-1) = p(1<z<2) = p(z<2) –
100 𝜎 100
2. The line width for semiconductor manufacturing is assumed to be normally distributed with a mean of 0.5 micrometer and a standard deviation of 0.05
micrometer.
(a) What is the probability that a line width is greater than 0.62 micrometer?
(b) What is the probability that a line width is between 0.47 and 0.63 micrometer?
(c) The line width of 90% of samples is below what value?
3. The fill volume of an automated filling machine used for filling cans of carbonated beverage is normally distributed with a mean of 12.4 fluid ounces and a
standard deviation of 0.1 fluidounce.
(a) What is the probability a fill volume is less than 12 fluid ounces?
(b) If all cans less than 12.1 and greater than 12.6 ounces are scrapped, what proportion of cans is scrapped?
(c) At what value should the mean be set so that 97.5% of all cans exceed 12.0 ounces?
(d) At what value should the mean be set so that 97.5% of all cans exceed 12.0 ounces if the standard deviation can be reduced to 0.5 ounces?
th 0.975
c) We need 12.0 to be located at the 97.5 percentile. Z = 1.96. 12 = 1.96 0.1 + mean.
×
0.975
(d) Z = 1.96. 12 = 1.96 0.5 + mean. Thus mean = 12-1.96 0.5 = 11.90
× ×
4. The length of an injection-molded plastic case that holds magnetic tape is normally distributed with a length of 90.2 millimeters and a standard deviation of 0.1
millimeter.
(a) What is the probability that a part is longer than 90.3 millimeters or shorter than 89.7 millimeters?
(b) What should the process mean be set at to obtain the greatest number of parts between 89.7 and 90.3 millimeters?
(c) If parts that are not between 89.7 and 90.3 millimeters are scrapped, what is the yield for the process mean that you selected in part (b)?
Solution: X~N(90.2,0.1), where X represents length of an injection-molded plastic case that holds magnetic tape
b) Find mean
p
using x = +z where p = p(89.7<x<90.3).
μ μ σ
c) Find mean
p
using x = +z where p = 1- p(89.7<x<90.3).
μ μ σ
5. The length of an injection-molded plastic case that holds magnetic tape is normally distributed with a length of 90 millimeters and a standard deviation of
0.1 millimeter. Suppose that 10 cases are measured, and they are assumed to be independent.
(a) What is the probability that all 10 cases are between 89.7 and 90.3 millimeters?
(b) What is the expected number of the 10 cases that are between 89.7 and 90.3 millimeters?
Solution: X~N(90.2,0.1), where X represents length of an injection-molded plastic case that holds magnetic tape
a) Find p(X=10) using X~B(10,p). Here p is unknown. Find p using normal distribution i.e. p = p(89.7<x<90.3), then find p(X=10) using X~B(10,p).
(Solve it).
b) Expected number of the 10 cases that are between 89.7 and 90.3 millimeters = np, here n=10 and p = p(89.7<x<90.3).
6. The life of a semiconductor laser at a constant power is normally distributed with a mean of 7000 hours and a standard deviation of 600 hours.
(a) What is the probability that a laser fails before 5000 hours?
(b) What is the life in hours that 95% of the lasers exceed?
(c) If three lasers are used in a product and they are assumed to fail independently, what is the probability that all three are still operating after 7000 hours?
c) Here X~B(n=3, p), where p = p(x>7000). Find p(x>7000) using normal distribution. Thus we have to find according to question p(X=3) using
the binomial distribution. (Solve it)
7. A supplier ships a lot of 1000 electrical connectors. A sample of 25 is selected at random, without replacement. Assume the lot contains 100 defective
connectors.
(a) Using a binomial approximation, what is the probability that there are no defective connectors in the sample?
(b) Use the normal approximation to answer the result in part (a). Is the approximation satisfactory?
(c) Redo parts (a) and (b) assuming the lot size is 500. Is the normal approximation to the probability that there are no defective connectors in the
sample satisfactory in this case?
Solution: X~hyp(N=1000, n=25, k=100), where X represents number of defective electrical connectors
a) Find p(x=0) using binomial distribution X~B(n=25, p = 100/1000=0.1), where represents number of defective electrical connectors (Solve it)
b) We have to use normal approximation to binomial distribution to find p(x=0). Here X~N( , ), where =np=25 0.1 = 2.5 and = sqrt(npq) =
μσ μ × σ
sqrt(25 0.1 0.9) = 1.5 because we know mean and SD for binomial distribution are np and sqrt(npq), where q = 1-p. Thus X~N(2.5,1.5)
× ×
Find p(x=0) using binomial distribution X~B(n=25, p = 100/500=0.20), where represents number of defective electrical connectors (Solve it)
Again, we have to use normal approximation to binomial distribution to find p(x=0). Here X~N( , ), where =np=25 0.20 = 5 and = sqrt(npq) =
μσ μ × σ
sqrt(25 0.20 0.80) = 2 because we know mean and SD for binomial distribution are np and sqrt(npq), where q = 1-p. Thus X~N(5,2)
× ×
Lecture 9
Joint Probability Distribution
We studied both discrete and continuous distributions in lectures 7 and 8 respectively. In those lectures, we have considered the distributions to be a function of one
random variable only. In real life problem, it is quite common for the probability distribution/density function to depend upon more than one variable. As an example, the
probability distribution of number of calls per minute depended upon the random variable which is the number of calls per minute, as well as the time of the day.
Similarly, the probability density of the time delay depended upon the time delay itself and the time of the day. These are classic case of two-dimensional, or bivariate
distributions. These are special case of general topic called joint probability distributions.
We begin with a formal definition of a joint distribution function for a two dimensional case. The definition presented here are natural extension of the definition of one-
variable case.
XY
Definition: Let X and Y be discrete random variables. The ordered pair (X, Y) is called a two dimensional discrete random variable. A function f such that
XY
f (x, y) = p(X = x, Y = y) is called a joint density, or a joint distribution for (X, Y).
Joint probability distributions follow the same basic principles of probability as we have learnt for discrete and continuous distributions. We list the conditions for joint
distributions.
Example -1
If we consider the random variable X as the class standing and Y as the major
Solution
Example 2
Proof:
Marginal distribution
Given the joint distribution for a two-dimensional random variable (X, Y), it is easy to derive the individual densities for X and Y To find the density for X alone, we sum
the joint density all over Y – for discrete distribution, or integrate the joint density over Y – for continuous distribution. Similar density can be obtained for Y by
summing, or integrating over X. These densities are called marginal densities or distributions.
Example-3:
Consider the joint density of X and Y, where X as the class standing and Y as the major
X y
Find the marginal densities f (x) and f (y).
Solution:
Marginal density of X:
Marginal density of Y:
Example 4
Solution
Marginal density of X and Y:
Mathematical Expectation
In this section we introduce the concept of expectation in case of a two-dimensional random variable.
Example -5
In an automobile factory, several jobs are performed by robots. One of these jobs is welding of two joints; the second, tightening of three bolts. Let X denotes the number
of defective welds and Y denotes the number of improperly tightened bolts per car. From past data, the joint distribution is indicated in the table below. The table also
shows the marginal densities.
X/Y 0 1 2 3 fX(x)
Solution
E(x) = 0×(0.840 + 0.030 + 0.020 + 0.010) + 1×(0.060 + 0.010 + 0.008 + 0.002) + 2×(0.010 +
0.005 + 0.004 + 0.001) = 0.120
E(y) = 0×(0.840 + 0.060 + 0.010) + 1×(0.030 + 0.010 + 0.005) + 2×(0.020 + 0.008 + 0.004) +
3×(0.010 + 0.002 +0.001) = 0.148
Example -6
Solution
Practice problems
1. Show that the following function satisfies the properties of a joint probability function.
XY
x y f (x, y)
1 1 1/4
1.5 2 1/8
1.5 3 1/4
2.5 4 1/4
3 5 1/8
Determine the following probabilities (a) p(X < 2.5, Y < 3)
(b) p(X < 2.5)
(c) p(Y < 3)
(d) p(X > 1.8, Y > 4.7)
(e) Determine E(X) and E(Y).
(f) The marginal probability distribution of the random variable X.
2. Determine the value of c that makes the function f(x, y) = c(x + y) a joint probability mass function over the nine points with x = 1, 2, 3 and y = 1, 2, 3.
(b) p(X = 1)
(c) p(Y = 2)
3. Determine the value of c such that the function f (x, y) = cxy for 0 < x < 3 and 0 < y < 3 satisfies the properties of a joint probability density function.
4.
Guideline
Example 5)
Lecture 10_Some Important Measures and Interval Estimation (Estimation of Parameters) Measures of average: mean, median, mode, quartiles, percentiles
Definition of average: It is a single central value that represents the whole set of data. Different measures of averages are: mean, median, mode, quartiles, percentiles.
𝑛
Mean: Denoted by 𝑋̅ and calculated by 𝑋̅ = (∑ 𝑋𝑖)/𝑛.
�
For example, for a set of monthly starting salaries of 5 graduates: 3450, 3550, 3550, 3480, 3355.
𝑛
Define X - monthly starting salaries of 5 graduates. Here 𝑋̅ = (∑ 𝑋𝑖)/𝑛= 3477.
�
Data Summary:
Mean = 3477 it means that most of graduates monthly starting salaries is about 3477$.
Recall the concept of average. Follow the following: Say for example, suppose we have the following 2 sets of raw data:
Make a question - is there any difference exist between each of observations from the average value?
Suppose X – score of CT1 (class test 1) and for example, suppose it is calculated average score 15.
Next investigation will be to see differences between each of student’s marks to average marks. If difference is 0, very easy to say student score and average score is
same.
If differences give us a positive (negative) sign (+(-)), we can say that student score is greater(lower) than the average score.
How we can measure variation of a data set. Various measures (or formulas) are available to detect variation. These are:
1. Range, R = H-L, H-highest value of a data set and L – Lowest value of a data set
th th
2. 75 25 75 25
Inter-quartile range, IR = p – p , p - 75 percentile and p - 25 percentile
2
3. Variance (denoted by 𝜎 ) and ∑𝑛 (𝑥
2
− 𝑥̅) .
2
is calculated by 𝜎 = 1
𝑥 𝑥 𝑖=1 𝑖
𝑛−1
𝜎𝑥 = 𝑠𝑞𝑟𝑡(
1 𝑛 2
(𝑥𝑖 − 𝑥̅) ). That means 𝜎𝑥 =SD = sqrt(variance).
𝑛−1
𝑖=1 ∑
Note: Measures of variation cannot be negative. At least can be 0, recall which indicates all students got same scores.
2
X (𝑥𝑖 − 𝑥̅)
3450 729
3550 5329
3550 5329
3480 9
3355 14884
2 1
Here variance, 𝜎 = 𝑛 2
∑ (𝑥 − 𝑥̅) = 26280/4= 6570 and SD = sqrt(variance)
= 81.05$.
𝑥 𝑛−1 𝑖=1 𝑖
Data summary: SD = 81.054 indicates that graduates salary varies from the average salary 3477$.
2
Note: Variance cannot be interpreted because its unit comes as a square. For example if mean = 3477$ then variance = 6570$ . Taking square root of variance removes
this problem (going back to the original unit of data), which is standard deviation (SD).
Interval estimation
The underlying principle of studying statistics is to draw conclusion about behavior of systems by looking at observed data. We have stated on several occasions that we
would want to understand the behavior of a system, that we called population. We have also stated that for logistical reasons, it would not be possible for us investigate
the entire population; as a result we performed our investigation on a sample ( a representative part of the population). We would then use the results of the sample to
infer the behavior of the population. This was referred to as inferential statistics in earlier lectures. We would begin to learn inferential statistics from this lecture.
In this lecture, we will be concerned with the probability distributions of certain statistics that arise from a sample, where a statistic is a random variable whose
value is determined by the
sample data. Some important examples of statistics are the mean, median, percentiles, variance and standard deviation etc.
The estimation of mean and variance that we have learnt so far are called point estimates. Let us suppose that for a particular problem, we obtain the point estimates of
the mean as μ0 and the variance as 20. We are inclined to ask a very important question: how confident are we of these point estimates? In this section we learn to attach
a ‘confidence interval’ to the estimation of the mean. In later section, we will learn to do a similar exercise for the variance and standard deviation.
Practice problems:
1. A confidence interval estimate is desired for the gain in a circuit on a semiconductor device. Assume that gain is normally distributed with standard deviation
= 20.
σ
2. n = 100 random samples of water from a fresh water lake were taken and the calcium concentration (milligrams per liter) measured. A 95%
confidence interval
3. The breaking strength of yarn used in manufacturing drapery material is required to be at least 100 psi. Past experience has indicated that breaking strength is
normally
distributed and that = 2 psi. A random sample of nine specimens is tested, and the average breaking strength is found to be 98 psi. Find a 95% two-sided confidence
σ
4. The yield of a chemical process is being studied. From previous experience yield is known to be normally distributed and = 3. The past five days of plant
σ
operation
have resulted in the following percent yields: 91.6, 88.75, 90.8, 89.95, and 91.3. Find a 95% two- sided confidence interval on the true mean yield.
5. The life in hours of a 75-watt light bulb is known to be normally distributed with = 25 hours. A random sample of 20 bulbs has a mean life of hours.
σ
2 2
6. A civil engineer is analyzing the compressive strength of concrete. Compressive strength is normally distributed with = 1000(psi) . A random sample of
σ
7. A research engineer for a tire manufacturer is investigating tire life for a new rubber compound and has built 16 tires and mean and standard deviation
are 60,139.7 and 3645.94 kilometers. Find a 95% confidence interval on mean tire life.
8. A particular brand of diet margarine was analyzed to determine the level of polyunsaturated fatty acid (in percentages). A sample of six packages resulted in
the following data: 16.8, 17.2, 17.4, 16.9, 16.5, 17.1.
(a) Is there evidence to support the assumption that the level of polyunsaturated fatty acid is normally distributed?
(b) Find a 99% confidence interval on the mean .
μ
9. The compressive strength of concrete is being tested by a civil engineer. He tests 12 specimens and obtains the following data.
2216 2237 2249 2204
2225 2301 2281 2263
2318 2255 2275 2295
(a) Construct a 95% two-sided confidence interval on the mean strength.
(b) Construct a 95% lower-confidence bound on the mean strength.
10. An article in Nuclear Engineering International (February 1988, p. 33) describes several characteristics of fuel rods used in a reactor owned by an
electric utility in
Norway. Measurements on the percentage of enrichment of 12 rods were reported as follows:
2.94 3.00 2.90 2.75 3.00 2.95
2.90 2.75 2.95 2.82 2.81 3.05
(a) Use a normal probability plot to check the normality assumption.
(b) Find a 99% two-sided confidence interval on the mean percentage of enrichment. Are you comfortable with the statement that the mean percentage of
enrichment is 2.95 percent? Why?
Correlation Analysis
Problem
50,57,41,54,54,38,63,48,59,46
Find the relationship between two variables and make a summary based on your findings.
Solution:
Denote x - No. of TV commercials and y- Total sales because it is believable that sales depends on No. of commercials
Make a shape of Scatter diagram to see what sorts of relation exist between and x and y.
70
60
50
40
Total Sales
30
20
10
0 1 2 3 4 5 6
No. of TV Commercials
Summary: We see that there is a positive relation exists between no. of TV commercials and total sales.
To understand very clearly what percent relation exist between x and y, we will apply the following formula (known as correlation coefficient) is defined as
𝑐𝑜𝑣(𝑥, 𝑦)
𝑟𝑥𝑦 = , 𝜎𝑥 > 0 𝑎𝑛𝑑 𝜎𝑦 > 0
𝜎𝑥 𝜎𝑦
where 𝑐𝑜𝑣(𝑥, 𝑦) = 1 𝑛
𝑛−1 𝑖=1
(𝑥𝑖 − 𝑥̅)(𝑦𝑖 − 𝑦̅)
∑
𝜎𝑥 𝑛
1 2
= 𝑠𝑞𝑟𝑡(𝑛 − 1 ∑(𝑥𝑖 − 𝑥̅) )
𝑖=1
𝜎𝑦 = 𝑠𝑞𝑟𝑡(
1 𝑛 2
(𝑦𝑖 − 𝑦̅) )
𝑛−1 𝑖=1 ∑
𝑥̅ = (∑ 𝑥𝑖)/𝑛
𝑖=1
𝑦̅ = (∑ 𝑦𝑖)/𝑛
𝑖=1
xy
Make the following calculation table (details Must see Textbook, pp.115-116) to find r
2 50 1 1 1
5 57 4 36 12
1 41 4 100 20
3 54 0 9 0
4 54 1 9 3
1 38 4 169 26
5 63 4 144 24
3 48 0 9 0
4 59 1 64 8
2 46 1 25 5
𝑐𝑜𝑣(𝑥,𝑦)
𝑥𝑦 = = 11/(1.49x7.93) =0.9310
𝑟
𝜎𝑥 𝜎𝑦
Summary
We see that 𝑟𝑥𝑦=0.93 means that when no. of TV commercials increases there is a 93% chance that total sales may be increased.
Regression Analysis
Fitting a model:
i i i
Y = α + βX + e , i = 1,2,….,n Where Y= dependent variable(e.g. total sales)
α =constant
Here there are two parameters α and β. These two will be estimated based on random samples data.
Using the Ordinary Least Square method, we find that estimated values of α and β
𝛼̂ = 𝑦̅ − 𝛽̂𝑥̅
𝑛
∑
(𝑥𝑖 − 𝑥̅)(𝑦𝑖 − 𝑦̅)
𝑖=1
𝛽̂ = 𝑛 2
∑ (𝑥𝑖 − 𝑥̅)
𝑖=1
Estimated model y on x:
i
y =
i
𝛼̂+𝛽̂x ,
Prediction or Forecasting i = 1,2,
….,n
The predicted model is defined by
p
y =
p
𝛼̂+𝛽̂x
Problem:
50,57,41,54,54,38,63,48,59,46
Solution:
i i i
Y = α + βX + e , i = 1,2,….,n
e = random error
Two parameters α and β will be estimated based on random samples data y and x.
Calculation table
2 50 1 1 1
5 57 4 36 12
1 41 4 100 20
3 54 0 9 0
4 54 1 9 3
1 38 4 169 26
5 63 4 144 24
3 48 0 9 0
4 59 1 64 8
2 46 1 25 5
i i
(ii) We know that estimated model y on x: y = 𝛼̂+𝛽̂x , where
𝛼̂ = 𝑦̅ − 𝛽̂𝑥̅
𝑛
∑
(𝑥𝑖 − 𝑥̅)(𝑦𝑖 − 𝑦̅)
𝑖=1
𝛽̂ = 𝑛 2
∑ (𝑥𝑖 − 𝑥̅)
𝑖=1
𝛽̂ =
99/20=
4.95
𝛼̂ =51-
(4.95x3
)=
36.15
i i
Thus, estimated model y on x becomes: y = 36.15+4.95x
Summary
𝛼̂=36.15 means that if there are no commercials (i.e. x=0), then expected sales may be 36.15$.
𝛽̂=4.95 means that when no. of TV commercials increases there is a chance that total sales may be increased.
p p
(ii) We know that the predicted model is: y = 𝛼̂+𝛽̂x , i = 1,2,…. According to question, we have to predict total
p
sales, when x=5. Thus y =36.15+(4.95x5)=60.9$.
So, we can expect when there are 5 commercials in a week, company can expect total sales 60.9$.