Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

STATISTICAL ANALYSIS FOR

EXPERIMENTAL DESIGN AND DATA


PROCESSING

Prof. Mustafa Sait YAZGAN


Assoc. Prof. Alpaslan EKDAL

1
Probability Theory
The chance of the occurrence of a random event is
defined as its probability. The basic axiom of the
probability theory states that each random event has a
certain probability that varies in the range of 0 to 1.
Denoting the random variable by a capital letter and
its value in an observation by the corresponding small
letter we can write

P(X = xi ) = pi

2
Probability Theory
P(X = xi ) = pi
X = xi, random event
P, symbol for the probability of the event
pi , the probability of the event X = xi
pi = 0 implies that the event X = xi will never occur
pi =1 means that the event will occur in all
observations.
With the increase of the probability from 0 to 1, the
chance of occurrence of the event also increases, i.e.
the event is seen more frequently.

3
Probability Theory
To throw a dice

As one of these events will certainly occur in each throw, the total probability is given
as:
6

෍ 𝑃(𝑋 = 1)
𝑖=1
4
Probability of drawing an “ace”
• What is the probability that a card drawn at random from a deck of cards will be an
ace?

: spade :heart : diamond : club


5
Probability
In general, the probability of an event is the number of favorable outcomes divided by
the total number of possible outcomes. (This assumes that all outcomes are equally
possible).
The same principle can be applied to the problem of determining the probability of
obtaining different totals from a pair of dice.
Dice 1 Dice 2 Total Dice 1 Dice 2 Total
1 1 2 4 1 5
1 2 3 4 2 6
1 3 4 4 3 7
1 4 5 4 4 8
1 5 6 4 5 9
1 6 7 4 6 10
2 1 3 5 1 6
2 2 4 5 2 7
2 3 5 5 3 8
2 4 6 5 4 9
2 5 7 5 5 10
2 6 8 5 6 11
3 1 4 6 1 7
3 2 5 6 2 8
3 3 6 6 3 9
3 4 7 6 4 10
3 5 8 6 5 11
3 6 9 6 6 12
6
Probability
Dice 1 Dice 2 Total Dice 1 Dice 2 Total
1 1 2 4 1 5
1 2 3 4 2 6
1 3 4 4 3 7
1 4 5 4 4 8
1 5 6 4 5 9
1 6 7 4 6 10
2 1 3 5 1 6
2 2 4 5 2 7
2 3 5 5 3 8
2 4 6 5 4 9
2 5 7 5 5 10
2 6 8 5 6 11
3 1 4 6 1 7
3 2 5 6 2 8
3 3 6 6 3 9
3 4 7 6 4 10
3 5 8 6 5 11
3 6 9 6 6 12

To calculate the probability that sum of two dices will be equal to 5, calculate the number
of outcomes which are equal to 5 and divide by the total number of outcomes (36). Since
four of the outcomes have a total of 5 (1,4; 2,3; 3,2; 4,1), the probability of sum of two
dices are equal to 5 is 4/36 = 1/9 . Similarly, probability of obtaining sum of 12 is computed
by dividing the number of favorable outcomes (there is only one) by the total number of
outcomes (36). The probability is therefore 1/36 .

7
The Probabilities of Compound Events

While the probability of simple events is calculated easily by using the simple
probability rules, the probability of compound events is calculated by using the
theory of set. The same rules of set theory are applied for calculating the
probability of compound events.

Probability theory tells us how the probability of a compound random event can
be computed when the probabilities of (simple or compound) events that
constitute it are known.

8
Elements of Set Theory

9
Set Theory
• Subset:

Representation of sets in the Venn Diagram

10
Random Event

The probability of a compound event consisting of two disjoint events is the sum
of their probabilities.

By extending this theorem, we can see that the sum of the probabilities of all
simple events for a random variable is equal to 1 as one of these simple events will
certainly occur in an observation. This type of events are called as mutually
exclusive events.

11
Mutually Exclusive Events
Two events are mutually exclusive if it is not possible for both of
them to occur. For example, if a dice is rolled, the event "getting a
1" and the event "getting a 2" are mutually exclusive since it is not
possible for the dice to be both a 1 and a 2 on the same roll. The
occurrence of one event "excludes" the possibility of the other
event.

• What is the probability of rolling a dice and getting either a 1 or a


6?
Since it is impossible to get both a 1 and a 6, these two events are
mutually exclusive.

Therefore, P(1 U 6) = P(1) + P(6) = 1/6 + 1/6 = 1/3


12
Non-disjoint events (Not mutually exclusive
events)

The probability of the union of two events that are not disjoint can
easily be computed by the Venn diagram, where each event is
represented by the region inside a closed curve whose area is
assumed to be proportional to the probability of the event.

P(AUB) = P(A) + P(B) – P(A∩B)

It is seen that in the general case we must subtract the probability


of the intersection from the sum of the probabilities P(A) and P(B).

13
Probability of the union of the events A and B that are not disjoint

14
Non-disjoint events (Not mutually exclusive
events)
• What is the probability that a card selected from a deck will be
either an ace (1) or a spade ()?

The relevant probabilities are:


P (ace) = 4/52
P (spade) = 13/52

The only way in which an ace and a spade can both be drawn is to
draw the ace of spades. There is only one ace of spades, so:
P(ace and spade) = 1/52 .

The probability of an ace or a spade can be computed as:


P (ace or spade) = P (ace) + P (spade) – P (ace and spade) =
4/52 + 13/52 – 1/52 = 16/52 = 4/13.
15
Non-disjoint events (Not mutually exclusive
events)

• Define the probability of union of two sets in the throw of a dice:

P (E) = P {2,4,6} = 1/2; P (S) = P {1,2} = 1/3

The probability of the union of the sets E and S can be computed as

P (EUS) = P (1,2,4,6) = P (E) + P (S) – P (E∩S)


P (E∩S) = P (E) . P (S) = 1/2 . 1/3 = 1/6
P (EUS) = P (E) + P (S) – P (E∩S)
P (EUS) = 1/2 + 1/3 – 1/6
P (EUS) = 2/3

16
Multiplication rule

The probability of the multiple events which occurs one, then


another one and so on is determined as the multiplication of all
probabilities

P (A and B) = P (A∩B)= P (A).P (B)

In other words, the probability of A and B both occurring is the


product of the probability of A and the probability of B.

17
Multiplication rule

• What is the probability that a fair coin will come up with heads
twice in a row?

Two events must occur: a head on the first toss and a head on the
second toss.

Since the probability of each event is 1/2, the probability of both


events is:

1/2 x 1/2 = 1/4

18
Multiplication rule

• Someone draws a card at random out of a deck, replaces it, and


then draws another card at random. What is the probability that
the first card is the ace of clubs and the second card is a club (any
club).

Since there is only one ace of clubs in the deck, the probability of the
first event is 1/52.

Since 13/52 = 1/4 of the deck is composed of clubs, the probability of


the second event is 1/4.

Therefore, the probability of both events is:


1/52 x 1/4 = 1/208

19
Multiplication rule

• Consider the probability of rolling a dice twice and getting 6 on


both of the rolls.

The events are defined in the following way:

Event A: 6 on the first roll: p (A) = 1/6


Event B: 6 on the second roll: p (B) = 1/6

P (A and B) = 1/6 x 1/6


P (A and B) = 1/36

20
Multiplication rule

• Consider the probability of having İ letter, then T letter and then Ü


letter when you draw them from a box of 29 letters of Turkish
alphabet. (Replace the letters into the box)

With replacing the letters into the box, the probability is

P (İ and T and Ü) = 1/29 . 1/29 . 1/29 = 1 / 24389

21
Complementary Event

22
Complementary Event
• Consider the throwing of a dice and define the probabilities of getting more
than 4 and less than or equal to 4.

The events are defined in the following way:

P (X>4) = 2/6
P (X4) = 4/6

Getting more than 4 and less than or equal to 4 is the complimentary event of
each other, then

P (X>4) + P (X4) = 1

2/6 + 4/6 = 1

23
Conditional Probability

24
Conditional Probability

25
Conditional Probability
• What is the probability that the total of two dices will be greater than 8 given that the
first dice is 6?
This can be computed by considering outcomes for which the first dice is 6. Then,
determine the proportion of these outcomes which are greater than 8. All the possible
outcomes for two dices are given below:

26
Conditional Probability
There are 6 outcomes for which the first dice is 6, and of these,
there are four possibilities that are more than 8 (6,3; 6,4; 6,5; 6,6).
The probability of sum is greater than 8 given that the first dice is 6
is therefore 4/6 = 2/3.

More formally, this probability can be written as:

P (sum>8 | Dice 1 = 6) = 2/3.

In this equation, the expression to the left of the vertical bar


represents the event and the expression to the right of the vertical
bar represents the condition. Thus it would be read as "The
probability that the sum is greater than 8 given that Dice 1 is 6 is
2/3".
27
Conditional Probability
• If someone draws a card at random from a deck and then,
without replacing the first card, draws a second card, what is the
probability that both cards will be aces?

Event A is that the first card is an ace. Since 4 of the 52 cards are
aces, P (A) = 4/52 = 1/13.

Given that the first card is an ace, what is the probability that the
second card will be an ace as well? Of the 51 remaining cards, 3 of
them are aces.

Therefore, P(B|A) = 3/51 = 1/17


P (A and B) = 1/13 x 1/17 = 1/221.

28
Conditional Probability
• Consider the probability of having İ letter, then T letter and then
Ü letter when you draw them from a box of 29 letters of Turkish
alphabet (Do not replace the letters into the box).

Without replacing the letters, the probability is


P (İ and T and Ü) = 1/29 . 1/28 . 1/27 = 1 / 21924

29
Probabilities of Engineering Problems
In engineering problems the previous approach is usually useless
in estimating the probabilities. We must base our estimates on the
frequencies. The frequency of a random event is the ratio of the
number of times it occurs to the total number of observations. If
the event X = xi is observed ni times during N experiments its
frequency is

fi = ni /N

The probability of a random event is defined as limit of its


frequency as the number of observations approaches infinity:

𝑛𝑖
𝑝𝑖 = lim ( )
𝑁→∞ 𝑁
30
Probabilities of Engineering Problems
Although we can never make infinite number of observations, it
can be assumed that fi approaches pi quite rapidly with the
increase of N. If no precipitation has been observed at a station for
ni=900 days along a period of N= 1500 days then the probability of
no precipitation can be estimated as

P (X = 0) = 900 / 1500 = 0.60

With the increase of the observation period the estimated


frequency will be a better estimate of the true probability.

31
Probabilities of Engineering Problems
• The number of vehicles waiting for a left turn at a cross–section
is observed to vary between 0 and 6, with the following
probabilities:
4 3
𝑃 𝑋=0 = 𝑃 𝑋=4 =
60 60

16 2
𝑃 𝑋=1 = 𝑃 𝑋=5 =
60 60

20 1
𝑃 𝑋=2 = 𝑃 𝑋=6 =
60 60

14
𝑃 𝑋=3 =
60

32
Probabilities of Engineering Problems
There are 7 simple events in the sample space of the random
variable X "the number of vehicles waiting for a left turn", the sum
of their probabilities adding up to 1.

We can compute, for example, the probability that more than 3


vehicles are waiting as simple events are disjoint:

P (X > 3) = P (X = 4) + P (X = 5) + P (X = 6)
= 3 / 60 + 2 / 60 + 1 / 60 = 6/60=1/10

The event "less than or equal to 3 vehicles waiting" is the


complementary of the above event.

Therefore P (X ≤ 3) = 1 – P (X > 3) = 1–1/10 = 9/10


33
Probabilities of Engineering Problems
• There are 3 bulldozers at a construction site, each having a
probability of no failure during the total period of construction
equal to 0.50. Let us consider the random variable X “the number
of bulldozers in operation throughout the construction period".

There are 4 events in the sample space of X. X can be equal to 0, 1,


2 or 3. Let us compute their probabilities.

Denoting a bulldozer in operation by S, and a bulldozer not in


operation by F, following 8 combinations are possible for the 3
bulldozers: FFF, FFS, FSF, SFF, FSS, SFS, SSF, SSS. These combinations
have equal probabilities because the probability of failure F is
assumed to be equal to the probability of no–failure (success 0.5).
Since the sum of the probabilities should be equal to 1, each of the
above combinations has a probability of 1/8. 34
Probabilities of Engineering Problems
Now we can determine the probabilities of the random events of
the variable X:

P(X = 0) = P(FFF) = 1/8


P(X = 1) = P(FFS) + P(FSF) + P(SFF) =1/8 + 1/8 + 1/8 = 3/8
P(X = 2) = P(FSS) + P(SFS) + P(SSF) =1/8 + 1/8+1/8 = 3/8
P(X = 3) = P(SSS) = 1/8

The sum of these probabilities is 1, as expected.

We shall discuss how this problem can be solved when the


probability of failure is not equal to 0.50 later, in relation to the
Bernoulli trials.

35
36
37
38
Probabilities of Engineering Problems
• One can get to town 2 from town 1 either by the route A or by
the routes B and C through town 3. In winter the probabilities of
the routes being open are P(A)=0.40, P(B)=0.75, P(C)=0.67. These
events are not independent. The probability of the route C to be
open when B is open is given as P(CB)=0.80, the probability of
the route A to be open when both B and C are open is
P(AB∩C)=0.5. Let us determine the probability that one can get
from 1 to 2 in winter.

39
Probabilities of Engineering Problems
The travel between the points 1 and 2 is possible if the route A is
open or both B and C are open. Let us find the probability that both
B and C are open.

Substituting into the equation for the probability of union:

40
Probabilities of Engineering Problems
• A structural frame consists of 3 elements with probabilities of
failure P(A)=0.05, P(B)=0.04 , P(C)=0.03. The events of failure of
the elements are assumed to be independent. What is the
probability of failure for the frame? (the frame fails when at least
one of its elements fail)

41
Probabilities of Engineering Problems
Since the events of failure will occur when one of the elements fail,
we must determine the probability of the union of probability of
failure of the elements P(AUBUC).

42
Probabilities of Engineering Problems

43
Probabilities of Engineering Problems
• A frame is hold by two ropes, A and B, with probabilities of
breaking off equal to 0.1 for each rope. The probability that one
of the ropes breaks off when the other does is 0.8. Determine
the probability of failure of the frame. (The frame fails, when
either of the ropes is broken)

44
Probabilities of Engineering Problems
We are looking for the probability P(AUB) where A and B denote the
events of breaking off of the ropes.
From the equation:

45
Bernoulli Trials
• Let us consider an experiment where only two outcomes are possible
(there are only two simple events in the sample space). Suppose one of
the outcomes corresponds (arbitrarily) to "success" and the other to
"failure ". The probability of the success will be denoted by p, and the
probability of the failure by q=1–p. Such an experiment is called a
Bernoulli Trial.
• Let us repeat the experiment n times (independent Bernoulli Trials). Now
consider the random variable X, the number of times of success in n trials.
X is a discrete variable that is an integer in the range of 0 to n. Let us
compute the probability of X = x in n trials. Suppose n=3 (three trials).

46
Bernoulli Trials
• The event of no success (X=0) will occur only when all
the three trials are failures. Since the trials are
considered independent this has the probability:
P(X=0) = qqq = q3

• 1 success in 3 trials can occur in three different ways:


first trial is successful and the others are failures,
second trial is successful and the others are failures,
third trial is successful and the others are failures. Each
of these three events has the probability pq2 and the
probability of their union is:
P(X=1) = 3pq2 : (pqq)+(qpq)+(qqp)

47
Bernoulli Trials
• 2 successes in 3 trials can also occur in three
different ways: first two trials are successful and
the third trial is failure, first and third trials are
successful and the second is failure, second and
third trials are successful and the first is failure.
Each event has the probability p2q and therefore
the probability of 2 successes in 3 events is:
P(X=2) = 3p2q : (ppq)+(pqp)+(qpp)
• Finally the probability of 3 successes in 3 events
is:
P(X=3) = p3
48
Bernoulli Trials
• What is the probability of no sixes in 3 throws in throw of a
dice?

49
Bernoulli Trials

50
Bernoulli Trials

• The probability of a successful bid for a


contractor is assumed to be p=1/3. Let us
compute the probability of 0, 1, 2, 3 and 4
successes in 4 bids. The variable X denotes the
number of successes in 4 bids.

51
Bernoulli Trials

52
Bernoulli Trials

53
Bernoulli Trials

(2.74)

54
Bernoulli Trials

• The spillway of a dam is designed for a


discharge that is exceeded with the probability
of 0.01 each year. The life of the dam is
assumed to be 50 years. What is the
probability that the design flow is exceeded
(at least once) during the life of the project?

55
Bernoulli Trials

56
Bernoulli Trials

57
Bernoulli Trials

58
Bernoulli Trials

• A breakwater is designed for waves with the


return period of T=10 years (probability of
exceedance p=0.10). The probability that the
breakwater is damaged when larger waves
occur is assumed to be 0.20. What is the
probability of a damage in a 3 year period?

59
Bernoulli Trials
• The probability of larger waves occurring X=0,1,2, and 3 years
in a period of 3 years are calculated by the Bernoulli
distribution:

60

You might also like