Revision on sets
A set is a collection of elements has the same properties.
For examples
A = { 1, 3, 5, 7, 9 } B = { m, a, g, h, r, b, y}
C= {Aly, Ayman, Ahmed}
Elements and subsets
If A = { 1, 2, 3, 4, 5, 6, 7} and B = {2, 4, 6}
Then we can say
3 A and 3 B
Also
BA
Empty set Ф
Ф={ } has no elements.
Sets and Relations
Symbol Representation
S
S
S A
AS
S
AB A B
AB
A B
AB= A B
C AC
A
S
A B
B
AB
Probability
Basic definitions:
1) Experiment: The term experiment refers to the process of obtaining an observed result of some
phenomenon.
2) Trail: the performance of an experiment is called a trial.
3) Outcome: the observed result on a trial of the experiment.
4) Random Experiment: it is an Experiment but
i - All possible outcomes can be completely defined in advance.
ii- Can be repeated , theoretically, any number of times under identical conditions but we can not
predict which of these outcomes will exactly occur when the experiment is carried out.
For example, if a coin is tossed, there are two possible outcomes of the experiment:
Heads (denoted by H) and
Tails (denoted by T)
On any performance of this experiment one does not know what the outcome will be. The
coin can be tossed as many times as desired.
5- Sample space (S)
It is the set of all possible outcomes of the experiment
Example:
An experiment of tossing two coins, and observed the face of each coin.
The sample space
S = [ HH, HT , TH , T,T]
2
6- Event:
An event A is a collection of some of the possible outcomes of the random experiment.
i.e.
AS
7- Mutually Exclusive Events:
Two events A and B are called mutually exclusive if both A and B cannot occur in the
some time.
AB=
Classical probability
The probability that the event A will occur, denoted by P(A) will defined as
number of outcomes belongs to A n (A)
P (A)
number of outcomes belongs to S n(S)
where
0 P(A) 1
Example 1
In an experiment of tossing a single fair die. Find the probability of:
a- The appearance of the number 6.
b- The appearance of an even number.
c- The appearance of a prime number
3
Example 2
A coin is tossed twice. Find is the probability of:
1- the appearance of one head
2- the appearance of one head at least
3- the appearance of one head at most
Example 3
A die is tossed two times. Find the probability of:
a- The appearance of the number 2 in the first toss.
b- The appearance of the number 3 in the first toss and 5 in the second.
c- The appearance of the number 4 in any toss.
d- The appearance of the two number, whose sum is 6.
e- The appearance of the two number, whose deference is 4 at least
4
P 1
Example 4
Three students are in a swimming race. If the first and the second have the same probability of
winning and each is twice as likely to win as the third. What is the probability that the second
wins?
5
Example 5
A die is designed such that, when it tossed, the probability of appearance of the numbers
1,2,3,4,5 are equal and the probability of appearance of 6 equal three times the probability of
appearance of one. Calculate the probability of
a- the appearance of an odd number
b- the appearance of a prime number
6
Example 6
Two dice are tossed if the first is fair and the second is designed such that, when it tossed,
the probability of appearance of the numbers 1,2,3,4,5 are equal and the probability of appearance
of 6 equal three times the probability of appearance of one. Calculate the probability of
a- The appearance of the number 2 in the first die
b- The appearance of the number 3 in the first die and 5 in the second.
c- The appearance of the number 4 in any die.
d- The appearance of the two number, whose sum is 6.
e- The appearance of the two number, whose deference is 4 at least
HW
7
Example 7
Two dice are tossed if the first is fair and the second is designed such that, when it tossed,
the probability of appearance of an even number is double the probability of appearance of an odd
number. Calculate the probability of
a- The appearance of the number 2 in the first die
b- The appearance of the number 3 in the first die and 5 in the second.
c- The appearance of the number 4 in any die.
d- The appearance of the two number, whose sum is 6.
e- The appearance of the two number, whose deference is 4 at least
HW
8
General Rule of Probability
P(A B) P(A) P(B) P(A B)
where
P(A B) 0 if A and B are mutually execlusive
P(A B) P(A) P(B) if A and B are independent
Example 8
The probability that Mohamed Nasser passes mathematics examination is 0.85 and the
probability that he passes English examination is 0.75. Find the probability that Mohamed passes
at least one course.
Example 9
If A and B are two events with P(A) = 1/4 , P(AB) = 1/3 and P(B) = k ; where k is
unknown.
Find k in each of the following.
1- A and B are mutually exclusive.
2- A and B are independent.
3- A is subset of B
HW
9
P(A) 1 P(A)
Example 10
Three students are in a swimming race. If the first and the second have the same probability of
winning and each is twice as likely to win as the third.
a- What is the probability that the first or the third wins?
b- What is the probability that the second does not win?
10
Example 11
A box contains 9 balls where 4 balls are white and 5 balls are black Two balls are drawn randomly
from the box (with replacement). Calculate the probability that
a- Both balls are black.
b- Both balls are of the same color.
c- Both balls are of different colors.
11
Example 12
A box contains 20 balls numbered from 1 to 20. Two balls are chosen at random (with
replacement) from the box, calculate:
a- Both balls carrying an even number.
b- Bath balls carrying a prime number.
HW
12
Probability distributions
There are two types of probability distributions, the first type is continuous (expect
any real value within an interval) and the second is discrete (depends on counting).
Binomial distribution
We use the binomial distribution for the small sample ( n less than 30 ) and we can
evaluate the probability of any event according to the following rule
P( x) nC x x (1 ) n x
Where
n is the number of the elements in the sample (= the sample's size)
π is the given probability in the problem (= population probability)
x is a selected number (within the sample) to evaluate its probability.
n!
n
Cx
x ! ( n x )!
13
Example 1
Forty percent of business travelers carry either a cell phone or a laptop (USA Today,
September 12, 2000). In a Sample of 15 business travelers,
a. What is the probability three have a cell phone or a laptop?
b. What is the probability that 12 of the travelers have neither a cell phone nor a laptop?
c. What is the probability at least two of the travelers have a cell phone or a laptop?
14
Example 2
A university found that 20% of its students withdraw without completing the
introductory statistics course. Assume that 20 students have registered for course this
quarter.
a. What is the probability that two or fewer will withdraw?
b. What is the probability that exactly four will withdraw?
c. What is the probability that more than two will withdraw?
HW
15
Poisson distribution
We use the Poisson distribution for the big sample ( n 30 ) and we can evaluate the
probability of any event according to the following rule
e x
P (x ) , n
x!
Example 1
It is estimated 0.5% of the callers to the billing department of the U.S. West
Telephone Company will receive a busy signal. If today we have 1200 callers;
a. What is the probability that there are five receive a busy signal?
b. What is the probability that there are at most two receive a busy signal?
16
Example 2
Ms. Mona is a lone head officer at the Arab African Bank. Based on her years of
experience, she estimates that the probability is 0.025 that an applicant will not be
able to repay his or her installment loan. Last month she made 400 loans.
a. What is the probability that three loans will be defaulted?
b. What is the probability that at least three loans will be defaulted?
HW
17
Example 3
Textbook authors and publishers work very hard to minimize the number of errors in
a text. However, some errors are unavoidable. Mr. J. A. Carmen, statistics editor,
report that the mean number errors per chapter is 0.8.
a. What is the probability that there are two errors in particular chapter?
b. What is the probability that there are less than two errors in particular
chapter?
18
Normal distribution
It is a distribution of a random continuous variable x whose range is ]-∞, ∞[ and its
probability density function is a bell-shaped curve depends on the two variables x and
of this random variable x. The curve of this function is called the normal curve.
Some properties of normal curve
1- The curve represents a continuous function.
The curve is symmetric about the line x x .
3- The curve has a maximum value at x x .
2- We can calculate the probability of any event from the following relation
2
1 x x
1
2
P (x ) e (1)
2
19
Standard normal distribution
It is a normal distribution whose mean x 0 and standard deviation 1
Some properties of standard normal curve
1- The curve is symmetric about the y-axis (x = 0).
2- The area under the curve and over the x-axis is one.
3- We can calculate the probability of any event from the following relation
1
1 z 2
P (z ) e 2 (2)
2
By comparing the two equations (1) and (2) we can write the transformation
equation from the normal into the standard normal distribution as follows
x x
Z
20
Example 1
If Z is a standard normal variable, find
1 P (0 Z 1.25) 2 P (0 Z 2.3)
3 P (0 Z 0.37 ) 4 P ( 1.73 Z 0)
5 P (0.28 Z 2.11) 5 P ( 1.79 Z 0.11)
6 P ( Z 1.19) 7 P ( Z 2.14)
8 P ( Z 2.11) 9 P ( Z 1.66)
21
Example 2
If the result of the M.B.A. students in statistics course is normally distributed with
mean 80 and standard deviation 10. Find:
a. The percentage of the students that have result less than 90.
b. The percentage of the students that have result greater than 65.
c. The probability of the students that have result between 65 and 85
22
Example 3
The mean starting salary for collage graduate in the spring of 2000 was $31280.
Assume that the distribution of starting salaries follows the normal distribution with a
standard deviation of $3300. What percent of the graduates have starting salaries:
a. Between $30000 and 35000?
b. More than $40000?
c. Between $35000 and 40000?
HW
23
We calculate the confidence intervals for the mean and the proportion. If the sample
size is small (n < 30) we use the t-table and for large sample size (n > 30) we use the
standard normal table.
If we are talking about the standard normal table we have the following table
Confidence level Z
90% 1.65
95% 1.96
99% 2.58
For the t-table
Degree of freedom (d.f.) = n-1 = 1- confidence level
Confidence interval and Test of hypothesis for the mean
Upper limit x E
Lower limit x E
Where
S .D
E= Z for n 30
n
S .D
E=t for n ≤ 30
n
24
Example 1
The MacBurger restaurant chain claims that the waiting time of the customers for
service is normally distributed with mean of three minutes. The quality-assurance
department found in a sample of 50 customers at the Warren Road MacBurger the
mean waiting time is 2.75 minutes and a standard deviation of one minute. At 0.05
significance level (), can we conclude that the mean waiting time is 3 minutes.
Solution
H0 : μ = 3
H1 : μ ≠ 3
x sample = 2.75
0.05 confidence level = 0.95 Z = 1.96
s 1
E Z 1.96 0.277
n 50
Minimum Value = 2.75 – 0.277 = 2.473
Maximum Value = 2.75 + 0.277 = 3.027
Then we accept H 0 and reject H 1
25
Example 2
Solve example 2 if n = 25
26
Example 3
A survey provided the estimate that the mean number of hours of using internet per
household is 5.6 hours per day (2020). Assume that the survey involved 23
households and that the sample standard deviation was 2 hours per day. Five years
ago, the population mean number of hours of internet using per household (µ) was
reported to be 4.3 hours. Test the hypotheses H0 : µ = 4.3 and H1 : µ≠ 4.3
use α = 0.1 .
27
Example 4
Solve example 3 if n=144
28
Confidence interval and Test of hypothesis for the proportion
Upper limit Ps E
Lower limit Ps E
Where
Ps (1 Ps )
E Z n 30
n
Ps (1 Ps )
E t n 30
n
Example 1
Shell Oil office workers were asked which work schedule appealed most:
Working five 8- hours days or four 10- hours days. Let P equal to the proportion of
office preferring the four 10-hours days alternative.
Test the hypotheses H 0 : P 0.50 and H 1 : P 0.50 , 0.01 . A sample of 105
office workers showed that 67 preferred the four 10-hours day schedule.
Solution
67
H 0 : P 0.50 P1 0.638
105
H 1 : P 0.50
0.01 confidence level = 0.99 Z = 2.58
Ps (1 Ps ) .638 (1 .638)
E Z 2.58 0.121
n 105
Upper limit Ps E = .638+.121= .759 = 75.9%
Lower limit Ps E = .638-.121= .517 = 51.7%
Then we reject H 0 and accept H 1
29
Example 2
A recent survey found that 40% of the Mexican teenagers are alcoholic (2019). A
random sample of 25 Mexican teenagers revealed that 11 of them are alcoholic
(2020).
Test the hypotheses H0 : P = 0.40 and H1 : P ≠ .0.40 use α = 0.1
30
Example 3
A recent survey found that 35% of the Mexican teenagers are alcoholic (2019). A
random sample of 150 Mexican teenagers revealed that 105 of them are not
alcoholic (2020).
Test the hypotheses H0 : P = 0.35 and H1 : P ≠ .0.35 use α = 0.1
Example 4
From past records it is known that 33% of Italian women are divorced. A random
sample of 24 Italian women revealed that 28% of them are divorced.
Test the hypotheses H0 : P = 33% and H1 : P≠ 33%, use α = 0.05 .
31
2
Chi-Square test ( test)
Contingency Table Analysis
A contingency table is used to investigate whether two traits or characteristics
are related.
If
c2 ≤ t2 There is no relation between the Variables
c2 t2 The Variables are related
c2 f o f e
2
fe
Where
f0 is the observed frequency
fe is the expected Frequency
where
Expected Frequency fe = (row total)(column total)/grand total
Each observation is classified according to two criteria.
We use the usual hypothesis testing procedure.
The degrees of freedom is equal to
= (number of rows -1)(number of columns -1).
32
Example 1
Is there a relationship between the location of an accident and the gender of the
person involved in the accident?
A sample of 150 accidents reported to the police were classified by type and
gender. At the .05 level of significance, can we conclude that gender and the
location of the accident are related?
Place
Work Home Other Total
Sex
Male 60 20 10 90
Female 20 30 10 60
Total 80 50 20 150
Solution
H0: Gender and the location of the accident are not related
H1: Gender and the location of the accident are related
There are (3- 1)(2-1) = 2 degrees of freedom.
2t = 5.991
33
observed Expected (fo – fe)2/fe
80 90 (60 48) 2
60 48 3
150 48
50 90 (20 30) 2
20 30 3.333
150 30
20 90 (10 12) 2
10 12 0.333
150 12
80 60 (20 32) 2
20 32 4.5
150 32
50 60 (30 20) 2
30 20 5
150 20
20 60 (10 8) 2
10 8 0.5
150 8
16.666
c2 t2 Then there is a relation between the variables
Gender and the location of the accident are related
We accept H1 and reject H0
34