Professional Documents
Culture Documents
SE125 Fall20 HWK 4 Solution PDF
SE125 Fall20 HWK 4 Solution PDF
Problem 1
The relative weights of the unconfined compressive strength of the soil are 3 to 5 to 2. This provides the
prior probabilities of the true strength:
3 5 2
𝑃[𝑇1200 ] = = 0.3; 𝑃[𝑇1000 ] = = 0.5; 𝑃[𝑇800 ] = = 0.2;
3+5+2 3+5+2 3+5+2
From the table in the statement you can find 𝑃[𝑖𝑛𝑑𝑖𝑐𝑎𝑡𝑒𝑑 𝑠𝑡𝑟𝑒𝑛𝑔𝑡ℎ | 𝑠𝑡𝑎𝑡𝑒]; for instance, the probability
that the indicated strength is 800psf, given that the real unconfined compressive strength is 1200psf, is 0.2:
a) Find the conditional probability of each of the possible outcomes of size two given that the
true strength is 1200 psf.
Firstoutcome: the indicated strength of both specimensis 1200 psf. The specimens are independent;
therefore,
1 2 1 2
𝑃[𝑧1200 ∩ 𝑧1200 | 𝑇1200 ] = 𝑃[𝑧1200 | 𝑇1200 ] ∗ 𝑃[𝑧1200 | 𝑇1200 ] = 0.5 ∗ 0.5 = 0.25
𝑗
𝑧𝑖 means that the strength indicated by specimen j is i.
Fourth outcome: the indicated strengthsare1200psf and 1000 psf. Two cases should be considered: the
strength of the first specimen is 1200 psf and the second specimen is 1000 psf and the strength of the first
specimen is 1000 psf and the second specimen is 1200 psf:
1 2 1 2 1 2 1 2
𝑃[(𝑧1200 ∩ 𝑧1000 ) ∪ (𝑧1000 ∩ 𝑧1200 ) | 𝑇1200 ] = 𝑃[𝑧1200 ∩ 𝑧1000 | 𝑇1200 ] + 𝑃[𝑧1000 ∩ 𝑧1200 | 𝑇1200 ]
1 2
= 2 ∗ 𝑃[𝑧1200 | 𝑇1200 ] ∗ 𝑃[𝑧1000 | 𝑇1200 ] = 2 ∗ 0.5 ∗ 0.3 = 0.3
1
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2020
Department of Structural Engineering Instructor: Joel P. Conte
1 2 1 2 1 2
𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1200 ] + 𝑃[𝑧800 ∩ 𝑧1000 | 𝑇1200 ] = 2 ∗ 𝑃[𝑧800 | 𝑇1200 ] ∗ 𝑃[𝑧1000 | 𝑇1200 ]
= 2 ∗ 0.2 ∗ 0.3 = 0.12
b) If the results of the sampling were one specimen indicating 1000 psf and one indicating 800
psf, find the engineer’s posterior probabilities of the strength.
To find the posterior probability we can use the Bayes’ theorem
1 2 1 2
1 2 1 2
𝑃[ (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 ) | 𝑇800 ] ∗ 𝑃[𝑇800 ]
𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 ) ]= 1 2 1 2
𝑃[ (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 ) ]
1
If we apply the definition of the probability of the union of two events and considering that the event 𝑧1000 ∩
2 1 2
𝑧800 and 𝑧800 ∩ 𝑧1000 are mutually exclusive, we have that:
1 2 1 2
𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 )]
1 2 1 2
(𝑃[ (𝑧1000 ∩ 𝑧800 )|𝑇800 ] + 𝑃[(𝑧800 ∩ 𝑧1000 )|𝑇800]) ∗ 𝑃[𝑇800 ]
= 1 2 1 2 =
𝑃[(𝑧1000 ∩ 𝑧800 )] + 𝑃[(𝑧800 ∩ 𝑧1000 )]
So we have that
1 2
1 2 1 2
2 ∗ 𝑃[𝑧1000 | 𝑇800 ] ∗ 𝑃[𝑧800 | 𝑇800 ] ∗ 𝑃[𝑇800 ]
𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 )∪ (𝑧800 ∩ 𝑧1000 )] = 1 2 1 2
𝑃[(𝑧1000 ∩ 𝑧800 )] + 𝑃[(𝑧800 ∩ 𝑧1000 )]
To evaluate the denominator we can use the Total Probability Theorem (TPT):
1 2 ] 1 2 1 2 1 2
𝑃[𝑧1000 ∩ 𝑧800 = 𝑃[𝑧1000 ∩ 𝑧800 | 𝑇800 ] ∗ 𝑃[𝑇800 ] + 𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1000 ] ∗ 𝑃[𝑇1000 ] + 𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1200 ]
∗ 𝑃[𝑇1200 ] = 0.2 ∗ 0.8 ∗ 0.2 + 0.5 ∗ 0.4 ∗ 0.5 + 0.3 ∗ 0.2 ∗ 0.3 = 0.15
2 1 ] 2 1 2 1 2 1
𝑃[𝑧1000 ∩ 𝑧800 = 𝑃[𝑧1000 ∩ 𝑧800 | 𝑇800 ] ∗ 𝑃[𝑇800 ] + 𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1000 ] ∗ 𝑃[𝑇1000 ] + 𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1200 ]
∗ 𝑃[𝑇1200 ] = 0.2 ∗ 0.8 ∗ 0.2 + 0.5 ∗ 0.4 ∗ 0.5 + 0.3 ∗ 0.2 ∗ 0.3 = 0.15
1 2 ]and𝑃[𝑧 2 1
𝑃[𝑧1000 ∩ 𝑧800 1000 ∩ 𝑧800 ] give the same result because the numbering of the event does not
1 2 ] 2 1 ]
change their probabilities. We have in fact that 𝑃[𝑧1000 ∩ 𝑧800 = 𝑃[𝑧1000 ∩ 𝑧800 so we can write
1 2
1 2 1 2
2 ∗ 𝑃[𝑧1000 | 𝑇800 ] ∗ 𝑃[𝑧800 | 𝑇800 ] ∗ 𝑃[𝑇800 ]
𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 )]= 1 2
2 ∗ 𝑃[(𝑧1000 ∩ 𝑧800 )]
2
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2020
Department of Structural Engineering Instructor: Joel P. Conte
1 2 1 2
We have discovered that the posterior probability of 𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 ) ] is exact the
1 2
same of the one of the event 𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 )].
1 2 1 2
0.2 ∗ 0.8 ∗ 0.2
𝑃[𝑇800 | (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧800 ∩ 𝑧1000 )]= = 0.213
0.15
The same reasoning can be applied to evaluate the other two conditional probabilities
1 2 2 1 1 2 ]
𝑃[𝑇1000 | (𝑧1000 ∩ 𝑧800 ) ∪ (𝑧1000 ∩ 𝑧800 ) ] = 𝑃[𝑇1000 | 𝑧1000 ∩ 𝑧800
1 2
𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1000 ] ∗ 𝑃[𝑇1000 ] 0.5 ∗ 0.4 ∗ 0.5
= 1 2 ] = = 0.667
𝑃[𝑧1000 ∩ 𝑧800 0.15
1 2 2 1 1 2
𝑃[𝑇1200 |( 𝑧1000 ∩ 𝑧800 ) ∪ (𝑧1000 ∩ 𝑧800 )] = 𝑃[𝑇1200 |( 𝑧1000 ∩ 𝑧800 )]
1 2
𝑃[𝑧1000 ∩ 𝑧800 | 𝑇1200 ] ∗ 𝑃[𝑇1200 ] 0.3 ∗ 0.2 ∗ 0.3
= 1 2 ] = = 0.120
𝑃[𝑧1000 ∩ 𝑧800 0.15
c) Suppose that after these two specimens the engineer continued sampling and found an
uninterrupted sequence of specimens indicating 1200 psf. After how many could he stop,
i) Confident that the strength was not actually 800?
Since we have found the posterior probabilities of strength having the first two test results (𝑧800 and 𝑧1000 ),
we can update the prior probabilities of strength. The new priors are equal to the posterior probabilities
found in part (b), namely,
𝑃[𝑇1200 ] = 0.120; 𝑃[𝑇1000 ] = 0.667; 𝑃[𝑇800 ] = 0.213;
To be confident that the strength was not 800psf, theposterior probability of the strength equal to 800
psfshould be zero.Suppose that one extra test is performed and the indicated strengthis 1200 psf.We have:
3
3
𝑃[𝑧1200 | 𝑇800 ] ∗ 𝑃[𝑇800 ] 0 ∗ 0.213
𝑃[𝑇800 | 𝑧1200 ]= 3 = 3 =0
𝑃[𝑧1200 ] 𝑃[𝑧1200 ]
𝑗
So, since 𝑃[𝑧1200 | 𝑇800 ] = 0 the engineer can stop the testing procedure after the first 1200 psftest result.
ii) At least “90 percent confident” that the strength was actually 1200?
We need to find
3 4 𝑛+2 ]
𝑃[𝑇1200 | 𝑧1200 ∩ 𝑧1200 ∩ … ∩ 𝑧1200
3
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2020
Department of Structural Engineering Instructor: Joel P. Conte
Since specimens are statistically independent, the conditional probabilities of n straight 1200 psf specimens
are:
3 4 𝑛+2 3 4 𝑛+2
𝑃[𝑧1200 ∩ 𝑧1200 ∩ … ∩ 𝑧1200 | 𝑇1200 ] = 𝑃[𝑧1200 | 𝑇1200 ] ∗ [𝑧1200 | 𝑇1200 ] ∗ … ∗ [𝑧1200 | 𝑇1200 ]
𝑛
= 0.5 ∗ 0.5 ∗ … ∗ 0.5 = (0.5)
3 4 𝑛+2 ]
Now, we want to find the smallest value of n such that 𝑃[𝑇1200 | 𝑧1200 ∩ 𝑧1200 ∩ … ∩ 𝑧1200 > 0.9. Let’s
3 4 𝑛+2 ].
try to put different values of n and computed 𝑃[𝑇1200 | 𝑧1200 ∩ 𝑧1200 ∩ … ∩ 𝑧1200 For instance, for n=1
we have
3 4 𝑛+2 ]
(0.5)1 ∗ 0.120
𝑃[𝑇1200 | 𝑧1200 ∩ 𝑧1200 ∩ … ∩ 𝑧1200 = = 0.474.
(0.5)1 ∗ 0.12 + (0.1)1 ∗ 0.667
Therefore, the engineer needs just 3 samples of an uninterrupted sequence of specimens indicating 1200
psf(after the first two specimens indicating 1000 and 800psf) to be “90 percent confident” that the strength
was actually 1200.
4
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
In part c ii) the Bayesian update procedure was used to evaluate the posterior probability of the true state of the soil given n sampling in one step.
The same procedure can be applied but for one specimen at the time, and the result will obviously be the same. We will show the procedure just for
two samples; for all the other, the update procedurewill be the same.
5
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
2 1 ]
1 2
𝑃[𝑧1000 |𝑇800 ] ∗ 𝑃[𝑇800 | 𝑧800
𝑃[𝑇800 | 𝑧800 𝑧1000 ]= 2 1 ] 2 1 ] 2 1 ]
𝑃[𝑧1000 |𝑇800 ] ∗ 𝑃[𝑇800 |𝑧800 + 𝑃[𝑧1000 |𝑇1000 ] ∗ 𝑃[𝑇1000 | 𝑧800 + 𝑃[𝑧1000 |𝑇1200 ] ∗ 𝑃[𝑇1200 | 𝑧800
We know that
1
1 ]
𝑃[𝑧800 |𝑇800 ] ∗ 𝑃[𝑇800 ]
𝑃[𝑇800 | 𝑧800 = 1 ]
𝑃[𝑧800
1
1 ]
𝑃[𝑧800 |𝑇1000 ] ∗ 𝑃[𝑇1000 ]
𝑃[𝑇1000 | 𝑧800 = 1 ]
𝑃[𝑧800
1
1 ]
𝑃[𝑧800 |𝑇1200 ] ∗ 𝑃[𝑇1200 ]
𝑃[𝑇1200 | 𝑧800 = 1 ]
𝑃[𝑧800
6
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
Problem 2
Density=[2437, 2437, ..., 2411];
Compstrength=[60.5, 60.9, ..., 58.8];
Code
figure(1)
subplot(2,2,1)
hist(Density, 10);
title('Density Histogram, 10 Bins');
xlabel('Density, Kg/m^3');
ylabel('Frequency');
subplot(2,2,2)
hist(Density, 15);
title('Density Histogram, 15 Bins');
xlabel('Density, Kg/m^3');
ylabel('Frequency');
subplot(2,2,3)
hist(Density, 20);
title('Density Histogram, 20 Bins');
xlabel('Density, Kg/m^3');
ylabel('Frequency');
subplot(2,2,4)
hist(Density, 25);
title('Density Histogram, 25 Bins');
xlabel('Density, Kg/m^3');
ylabel('Frequency');
figure(2);
subplot(2,2,1)
hist(Compstrength, 10);
title('Compressive Strength Histogram, 10 Bins');
xlabel('fc, MPa');
ylabel('Frequency');
subplot(2,2,2)
hist(Compstrength, 15);
title('Compressive Strength Histogram, 15 Bins');
xlabel('fc, MPa');
ylabel('Frequency');
subplot(2,2,3)
hist(Compstrength, 20);
title('Compressive Strength Histogram, 20 Bins');
xlabel('fc, MPa');
ylabel('Frequency');
subplot(2,2,4)
hist(Compstrength, 25);
title('Compressive Strength Histogram, 25 Bins');
xlabel('fc, MPa');
ylabel('Frequency');
figure(3)
subplot(1,2,1)
cdfplot(Density)
title('Cummulative Density function, Density');
subplot(1,2,2)
cdfplot(Compstrength)
title('Cummulative Density function, Compressive Strength');
figure(4)
scatter(Density,Compstrength,15,[0,0,0])
title('Scatter Plot of Compressive Strength vs Density');
xlabel('Density (Kg/m^3)');
ylabel('fc, MPa');
7
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
part (a)
8
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
part (b)
part (c)
c which has a probability not being exceeded of 25% =2436 Kg/m3
c which has a probability not being exceeded of 50% =2445 Kg/m3
c which has a probability not being exceeded of 75% =2455 Kg/m3
part (d)
A: probability that f’c is less than 55MPa = 17.5%
B: probability that f’c is greater than 65MPa = (1-0.825) = 17.5%
P( A B) = P( A) + P( B) = 35%
9
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
part (e)
10
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
Problem 3
Matlab code:
clear, clc
x=0:1:10
p=0.2
n=10
y=binopdf(x,n,p)
stem(x,y)
label(‘x’)
ylabel(‘f_X(x)’)
11
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
12
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
Reader: E(x) = np = 2
13
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
Problem 4
(e)
P[( x 8) ( x 6)]
P[ x 8 | x 6] =
P[ x 6]
P[( x 8)] 1 − P[( x 8)] 1 − Fx (8) 1 − 0.8
P[ x 8 | x 6] = = = = = 0.5
P[ x 6] 1 − P[ x 6] 1 − Fx (6) 1 − 0.6
14
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
Problem 5
15
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
And
𝑃[(𝑆 > 𝑅)|(𝑅 = 10)]. 𝑃[𝑅 = 10] 0.042
𝑃[𝑅 = 10|(𝑆 > 𝑅)] = = = 0.3
𝑃[𝑆 > 𝑅] 0.148
Check:
16
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
Problem 6
17
UNIVERSITY OF CALIFORNIA, SAN DIEGO SE125 - Fall Quarter 2018
Department of Structural Engineering Instructor: Joel P. Conte
18