4
7/21/2019 Bayes’ Rule for the Practicing Structural Engineer http://slidepdf.com/reader/full/bayes-rule-for-the-practicing-structural-engineer 1/4  January 2013 38 aids for the structural engineer’s toolbox ENGINEERS NOTEBOOK  James Lefter, P.E. is a retired structural engineer with experience in industry, private practice, and federal service. He served as Director of Engineering for the Veterans Administration, Visiting Professor and Senior Lecturer in the Departments of Civil and Environmental Engineering at the University of Illinois and Virginia ech, a Member of the  ACI-318 Committee, and Project  Manager for the Learning From Earthquakes Program at the Earthquake Engineering Research Institute (EERI). He can be reached at  [email protected] . By James Lefter, P.E. Bayes’ Rule for the Practicing Structural Engineer P racticing structural engineers must make decisions on safety, cost and utility even  when “hard information” is not avail- able. “Bayes’ Rule” is a mathematical tool for using experience and judgment to cal- culate the probabilities that could guide these decisions. Te engineer assembles data such as test results, develops a hypothesis relating the data to underlying causes, and uses Bayes’ Rule to calculate the probability that the hypothesis is correct. Bayes’ Rule is from a paper by Tomas Bayes published posthumously and later affirmed and augmented by Pierre-Simon Laplace. Recent applications of Bayes’ Rule, coupled with com- puter technology, have revolutionized statistical, scientific, and medical analyses (Iverson 1984, Mcgrayne 2011). Tis article shows how to use Bayes’ Rule with a spreadsheet program, such as Microsoft® Excel, to evaluate quality control sampling, test reports, reliability of bridge gird- ers under random loading, office man- agement decisions, and the Monty Hall Problem. Using Bayes’ Rule requires an understanding of probability and statistics, and advanced appli- cations can be challenging. Most textbooks on finite mathematics (Goldstein et al 2007) include an introduction to probability and Bayes’ Rule. Tere are also many Internet sources (Albert 2006). Tis article is at the introductory level.  A derivation of Bayes’ Rule is included as an  Appendix  to the online version of this article at www.STRUCTUREmag.org. Bayes’ Rule offers advantages over conventional statistics. Te engineer may: 1) use subjective  judgment or experience, based on the availabil- ity of test data; 2) update an analysis when new information becomes available; and 3) automati- cally calculate the probabilities of false positives (false alarms) and false negatives (missed defects or other items). False positives may increase cost,  while false negatives may be disastrous. A high probability of either alerts the engineer that the test process may be wanting. Probability and Statistics “Probability” is a “fair bet” in a world of uncer- tainty. From statistics, P(A) = N(A) / N ≤ 1, where N is the total number of outcomes of an event, N(A) is the number of outcomes leading to A, and P(A) is the fraction (probability) of the total number of events in which A occurs. Given S as a subset of N, and (!) as the factorial symbol, the number of ways in which S items can be chosen from N possibilities is N!/[S! (N-S)!]. Low-strength concrete is a frequently encountered problem in construction. ACI 318 Section 5.6.2.1 (ACI 318- 08) requires at least one strength test for every 150 cubic yards (cy) of concrete placed each day, but not less than five strength tests for every class of concrete. If delivered in 5-cy capacity trucks, at least 30 trucks will be used to transport the concrete. If 10% of the concrete does not meet the ACI requirements, calculate the probability that the low-strength concrete truckloads would not  be detected. Te number of ways of drawing five samples from 30 truckloads = 30!/(5! 25!) = 142,506.  Assuming three truckloads of low-strength con- crete (10% of 30), the number of ways of drawing five samples without low strength concrete = 27!/(5! 22!) = 80,730. P(A) = the probability of not  detecting the low strength concrete = 80,730/142,506 = 0.567. Bayes’ Rule Analyses  An “event” is the cause and its probability is called a “prior.” Te engineer observes data and uses Bayes’ Rule to calculate the probability of its relationship to a perceived cause. Te probabili- ties of the observed effects, the data, are called “likelihoods” and may be based on experience, tests results, standard handbooks, or judgment.  A Bayes’ Rule analysis follows these general steps: 1) Propose a hypothesis P(E|) relating priors and likelihoods. 2) List available information about the priors, as probabilities. 3) List the related likelihoods, as probabilities. 4) Multiply the priors by the likelihoods, using Bayes’ Rule to calculate the “posterior probabilities.” Te posterior probabilities represent the prob- ability that the hypothesis P(E|) is true. Te process is shown in the example problems. If the engineer has no relevant prior knowledge, a value of P(E) = 0.5 is recommended. Example 1 – Quality Control Sampling Tere are advanced applications of Bayes’ Rule in which the population data are the priors and the binomial distributions are the likelihoods. For this example, the HYPEGEOMDIS function in Microsoft Excel is more direct. In order, the If a man will begin with certainties, he shall end in doubts; but if he will be content to begin with doubts he will end in certainties. – Francis Bacon

Bayes’ Rule for the Practicing Structural Engineer

Embed Size (px)

DESCRIPTION

Bayes’ Rule for the Practicing Structural Engineer

Citation preview

Page 1: Bayes’ Rule for the Practicing Structural Engineer

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 14 January 201338

aids for the structuralengineerrsquos toolbox

ENGINEERrsquoS NOTEBOOK

James Lefter PE is a retiredstructural engineer with experiencein industry private practiceand federal service He served asDirector of Engineering for theVeterans Administration VisitingProfessor and Senior Lecturer inthe Departments of Civil andEnvironmental Engineering atthe University of Illinois andVirginia ech a Member of the

ACI-318 Committee and Project Manager for the Learning FromEarthquakes Program at theEarthquake Engineering ResearchInstitute (EERI) He can bereached at jleftercomcastnet

By James Lefter PE

Bayesrsquo Rule for the PracticingStructural Engineer

Practicing structural engineers must makedecisions on safety cost and utility even

when ldquohard informationrdquo is not avail-able ldquoBayesrsquo Rulerdquo is a mathematical

tool for using experience and judgment to cal-culate the probabilities that could guide thesedecisions Te engineer assembles data such astest results develops a hypothesis relating thedata to underlying causes and uses Bayesrsquo Rule

to calculate the probability that the hypothesisis correctBayesrsquo Rule is from a paper by Tomas Bayes

published posthumously and later affirmed andaugmented by Pierre-Simon Laplace Recentapplications of Bayesrsquo Rule coupled with com-puter technology have revolutionized statisticalscientific and medical analyses (Iverson 1984Mcgrayne 2011) Tis article shows how to useBayesrsquo Rule with a spreadsheet program suchas Microsoftreg Excel to evaluate quality controlsampling test reports reliability of bridge gird-

ers under random

loading office man-agement decisionsand the MontyHall ProblemUsing Bayesrsquo

Rule requires anunderstanding of

probability and statistics and advanced appli-cations can be challenging Most textbooks onfinite mathematics (Goldstein et al 2007) includean introduction to probability and Bayesrsquo RuleTere are also many Internet sources (Albert2006) Tis article is at the introductory level

A derivation of Bayesrsquo Rule is included as an Appendix to the online version of this article atwwwSTRUCTUREmagorgBayesrsquo Rule offers advantages over conventional

statistics Te engineer may 1) use subjective judgment or experience based on the availabil-ity of test data 2) update an analysis when newinformation becomes available and 3) automati-cally calculate the probabilities of false positives(false alarms) and false negatives (missed defectsor other items) False positives may increase cost

while false negatives may be disastrous A highprobability of either alerts the engineer that the

test process may be wanting

Probability and Statistics

ldquoProbabilityrdquo is a ldquofair betrdquo in a world of uncer-tainty From statistics P(A) = N(A) N le 1 whereN is the total number of outcomes of an eventN(A) is the number of outcomes leading to Aand P(A) is the fraction (probability) of the totalnumber of events in which A occurs Given S asa subset of N and () as the factorial symbol thenumber of ways in which S items can be chosenfrom N possibilities is N[S (N-S)]

Low-strength concrete is a frequently encounteredproblem in construction ACI 318 Section 5621(ACI 318- 08) requires at least one strength testfor every 150 cubic yards (cy) of concrete placedeach day but not less than five strength testsfor every class of concrete If delivered in 5-cycapacity trucks at least 30 trucks will be used totransport the concrete If 10 of the concretedoes not meet the ACI requirements calculatethe probability that the low-strength concretetruckloads would not be detected

Te number of ways of drawing five samplesfrom 30 truckloads = 30(5 25) = 142506 Assuming three truckloads of low-strength con-crete (10 of 30) the number of ways of drawingfive samples without low strength concrete =27(5 22) = 80730 P(A) = the probabilityof not detecting the low strength concrete =80730142506 = 0567

Bayesrsquo Rule Analyses

An ldquoeventrdquo is the cause and its probability is calleda ldquopriorrdquo Te engineer observes data and uses

Bayesrsquo Rule to calculate the probability of itsrelationship to a perceived cause Te probabili-ties of the observed effects the data are calledldquolikelihoodsrdquo and may be based on experiencetests results standard handbooks or judgment A Bayesrsquo Rule analysis follows these general steps

1) Propose a hypothesis P(E|) relatingpriors and likelihoods

2) List available information about thepriors as probabilities

3) List the related likelihoods as probabilities4) Multiply the priors by the likelihoods

using Bayesrsquo Rule to calculate the

ldquoposterior probabilitiesrdquoTe posterior probabilities represent the prob-ability that the hypothesis P(E|) is true Teprocess is shown in the example problems If theengineer has no relevant prior knowledge a valueof P(E) = 05 is recommended

Example 1 ndash Quality Control Sampling

Tere are advanced applications of Bayesrsquo Rulein which the population data are the priors andthe binomial distributions are the likelihoods Forthis example the HYPEGEOMDIS functionin Microsoft Excel is more direct In order the

If a man will begin with certainties

he shall end in doubts but if he will

be content to begin with doubts he

will end in certainties

ndash Francis Bacon

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 24STRUCTURE magazine January 201339

inputs are the number of ldquosuccessesrdquo in thesample the size of the sample the numberof successes in the population and the sizeof the population In this case a ldquosuccessrdquo isactually not detecting low-strength concreteHYPEGEOMDIS (0 5 3 30) returns thecorrect value of 0567

Example 2 ndash Weld Inspection Report

Te engineerrsquos experience indicated that10 of welds inspected by the specifiedtest method would have defects Laboratoryreports from a project indicated that 20 ofthe 50 welds inspected to date had defects(Jordaan 2005) Te engineer used BayesrsquoRule to analyze the situation E was that aflaw was present in a weld and was thatthe flaw would be detected by the speci-fied test process Te hypotheses P(E|) wasthat genuine weld flaws would be detectedBased on the engineerrsquos prior experienceP(E) = 01 Te laboratory report indicated

that P(|E) = 08 and P(1|E) = 02 Fromthe Probability Sum Rule P(E1) = 1- P(E)= 09 P(|E1) = 02 and P(1|E1) = 08Calculating the posterior probabilities byBayesrsquo Rule equations is cumbersome If thefactors are set up using a BAYES BOX (see Appendix ) the calculation is more direct andconvenient Te resulting posterior prob-abilities are identical to those calculated byusing the Bayesrsquo Rule equationso interpret the results Te engineer

expected 10 of the welds to have flawsie of the 50 welds inspected to date five

would have flaws (positive test results) Telaboratory indicated that 20 of the welds(10 of 50) had flaws Te laboratory testsdid not calculate the probabilities of falsepositives and false negatives Te BayesrsquoRule analysis calculated P(E|) = 031 theprobability that welds that tested positivewould actually have defects Of the 50 weldsexamined four welds (031 x 026 x 50 =403) would have ldquotruerdquo defects P(E1|) =069 so about nine ldquodefectiverdquo welds (069x 026 x 50 = 897) would be false positives

that is the test would have detected ninenon-existing flaws Tis was a statisticalype 1 error Since P(E|1) = 003 aboutone weld (003 x 074 x 50 = 111) had aflaw that the tests missed Tis was a statisti-cal ype 2 error Finally P(E1|1) = 097therefore the absence of flaws was correctlydetected for about 36 of the welds (097 x074 x 50 = 3589)

Te engineer would note that the combina-tion of the probabilities of false positives andfalse negatives are indicators of the strictnessof the testing system Critical projects such asnuclear power plants need tight controls eventhough they are costly in time and budgetHowever false negatives flaws that werenot detected in critical facilities could bevery hazardousIf more test data becomes available the pos-

terior probabilities are used as priors in anupdating analysis

Example 3 ndash Bridge Girder Reliability

(Monte Carlo Method)

Te Monte Carlo method is used to evaluatethe reliability R of a bridge girder subjectedto random simulated loads Te random load-ing is applied iteratively until R convergesTe number of iterations may range fromhundreds to thousands Microsoft Excel cangenerate over 30000 iterationsTe bridge girder is a W36x135 spanning

60 feet subject to a uniform dead load of05 kipsfoot and a concentrated live load

at mid-span with a mean value of 40 kipsTe engineer calculated the girder flexuralstress using 200 simulated load tests assum-ing a normal distribution with a standarddeviation equal to the mean divided by thesquare root of the number of samples butnot less than 983089983087983093 of the mean (8 kips in thiscase) If this stress was less than or equal tothe allowable value of 24 ksi then the girder

was considered acceptable Te reliabilityfactor R of the girders was calculated as theratio of the number of acceptable girders tothe total number of girders (200) (Elishakoff1999 pp 440-41) (Spreadsheet details arein the Appendix )Te results indicated a reliability factor R

of 064 which does not significantly varyupon increasing the number of iterations Teengineer was confident about the adequacy ofthe girders and assumed P(E) = 095 (priors)accordingly then used the R values as likeli-hoods in the Bayes Box analysis P(E|) is the

probability that a girder meeting or exceedingR would be acceptedTe reliability of the bridge girders under

random loading increased from 064 to 097for girders meeting both E and require-ments (about 122 of 200 girders) Howeverthe engineer noted from P(E|1) = 091 thatabout 68 of the girders were ldquofalse negativesrdquoindicating that the engineer may be overcon-fident about the test process As always theengineer ultimately decides on the accept-ability of R

able for Example 2 Weld Inspection

Hypothesis Event Priors Likelihoods ProductPosterior

Probability Number of

Welds

P(E|) E 01 08 008 031 4

P(E1|) E1 09 02 018 069 9

P()= 026

P(E|1) E 01 02 002 003 1

P(E1|1) E1 09 08 072 097 36P(1)= 074

Welds 50 50

continued on next page

Hypothesis Events Priors Likelihoods ProductPosterior

Probability Number of

Girders

P(E|) E 095 064 0608 097 122

P(E1|) E1 005 036 0018 003 4

P()= 0626

P(E|1) E 095 036 0342 091 68

P(E1|1) E1 005 064 0032 009 6

P(1)= 0374

otal Girders 200 200

able for Example 3 Bridge girder reliability

Bayes Box

P(E) = 095P(E1) = 005P(|E) = 064P(|E1) = 036

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 34STRUCTURE magazine January 201340

Example 4 ndash Office Management4A Bridge Collapse

Preliminary Assessment

A bridge was being upgraded when it col-lapsed suddenly A review of collapses ofbridges of similar construction and vintageindicated the following probabilities of vari-ous causes 02 by overload 02 by designdeficiencies 03 by construction deficien-cies 01 by inadequate maintenance and02 by other causes However the engineernoted that at the time of collapse one sideof the bridge was open to normal traffic

while the other was loaded with construc-tion equipment Accordingly the engineerestimated a probability of 04 that the failure

was due to an overload from the combina-tion of construction loads and live loadsTe other probabilities of failure were thenassumed as 02 by design deficiencies 02by construction deficiencies 01 by inad-equate maintenance and 01 by other causes

Calculate the probability P(E|) for eachcause of failureTe probability of failure due to Overload

increased from 02 to 038

4B Project Assignment

Te supervising engineer considers bothon-time performance and accuracy whenassigning a project Engineer A completed70 of assigned projects on schedule butthere were major design changes requiredduring construction on 40 of themEngineer B completed 40 of projects on

schedule and only 10 of them requiredmajor design changes during construction Assuming similar projects in scope and sched-ule duration calculate the probability thateach engineer would complete a project onschedule without major design changesEngineer A has a higher probability of com-

pleting a project on schedule and withoutmajor design changes

4C Monty Hall Problem

Suppose you are a contestant on a V gameshow and are given the choice of three doors

Behind one of the doors is a prize and behindthe other two doors are goats You pick adoor Te host who knows what is behindeach door then opens one of the other doorsshowing a goat You are allowed to changeyour door choice Assuming you want theprize do you changeUsing Bayesrsquo Rule P(E) is the probability

that the prize is behind your door = ⅓ P(E1)is the probability that the prize is behindone of the other two doors = ⅔ When thehost opens a door that reveals a goat thelikelihood probability P(|E) is the same

that the prize is behind your door vs theremaining door = frac12 Although it may seem counterintuitiveselecting the other remaining door rather

than the one you chose initially actuallyimproves your probability of winning to067 Tis example illustrates the broadapplicability of Bayesrsquo Rule and the impor-tance of using both priors and likelihoodsfor a complete analysis

Advanced Applications

Many advanced applications of BayesrsquoRule were supported by National ScienceFoundation funding and are available Teyinclude structural responses to random exci-tations decision analysis in building codesuncertainty in model analysis reliability of

damaged structures and random loadingfrom wind and seismic forces or terroristattacks Many additional articles and com-puter programs are on the Internet

Conclusions

An engineer intuit ively makes inferencesbased on available prior knowledge andrelated experimental data while reservingthe right to revise the inference based onnew information Bayesrsquos Rule is a vehiclefor organizing this approach a mathe-matical process for using experience and judgment to calculate the probabilit ies thatcould help guide engineering decisionsIt tests both the ldquopriorsrdquo and the ldquolikeli-hoodsrdquo while calculating the probabilitiesof an ldquoErdquo and ldquordquo hypothesis In practice

Cause Prior Likelihood ProductPosterior

Probability

Design 02 02 004 019

Construction 03 02 006 029

Overload 02 04 008 038

Maintenance 01 01 001 005

Other 02 01 002 010Sum 1 1 021 1

EngineerPriors

On-imeLikelihoodNo-Change Product

PosteriorProbability

A 07 06 042 054

B 04 09 036 046

Sum 078 1

Prior Likelihood Product PosteriorProbability

E 0333 05 017 033

E1 0667 05 033 067

Sum 05 1

Hypothesis Event Priors Likelihoods

P(E|) E P(E) P(|E)

P(E1|) E1 P(E1) P(|E1)

P() Sum

P(E|1) E P(E) P(1|E)

P(E1|1) E1 P(E1) P(1|E1)

P(1) Sum

Example 4A Bridge collapse

Example 4B Project assignments

Example 4C Monty Hall problem

Bayes Box for Direct Calculations

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 44STRUCTURE magazine January 201341

the engineer would evaluate several sources of information such as the qualificationsof the testing laboratory test records etc before making a critical deci sionhe premise underlying Bayesrsquo Rule as well as all education is learning from experience

and judgment Bayesrsquo Rule reminds us that attempts to predict the future responsiblyare possible only in terms of probability and that the highly improbable may occur

As always the engineer is the one who ultimately decides

References

ACI Committee 318 Building Code Requirements for Structural Concrete ACI 318-08 andCommentary American Concrete Institute Farmington Hills MI 2008

Albert J A Bayesian Primer Key College Publishing 2006

Elishakoff I Probabilistic Teory of Structures 2nd Ed Dover Publications Mineola NY1999 pp 440-41

Goldstein LJ Schneider DI and Siegel MJ Finite Mathematics and Its Applications Pearson Prentice Hall 2007 pp 273-457

Iverson GR Bayesian Statistical Inference Sage Publications Newbury Park 1984

Jordaan I Decisions Under Uncertainty Cambridge University Press 2005 pp 49-52

Mcgrayne S Te Teory Tat Would Not Die Yale University Press New Haven 2011

Appendix

Bayesrsquo Rule

E = the event E occursP(E) = the probability that event E occursE1 = the event E does not occurP(E1) = the probability that event E does

not occurE and E1 are ldquoknownrdquo based on experience

or estimated using judgment and P(E)and P(E1) are called ldquopriorsrdquoP(E) + P(E1) = 1 = a positive test resultP() =the probability that occurs1 = a negative test resultP(1) = the probability that 1 occursP() and P(1) are based on actual obser-

vations and are called ldquolikelihoodsrdquoP() + P(1) = 1Note that E and are independent eventsP(|E) = conditional probability that

occurs given that E also occurs

P(|E1) = conditional probability that occurs even though E does not occur(false positive)

P(1|E) = conditional probability that1 occurs even though E has occurred(false negative)

P(1|E1) = conditional probability that 1occurs given that E does not occur

By the Probability Sum Rule P(|E) +P(1|E) = 1 and P(|E1) + P(1|E1)= 1

By probability rules P(E|) x P( ) =P(|E) x P(E)

Rearranging P(E|) = P(|E) x P (E) P() which is Bayesrsquo Rule given P()gt 0

P() is a normalizing factor = P(E) xP(|E) + P(E1) x P(|E1)

Te usual form of Bayesrsquo Rule is P(E|) =P(|E) x P(E) [P(|E) x P(E) + P(E1)x P (|E1)]

Other forms of Bayesrsquo Rule are

P(E1|) = P(|E1) x P(E1) [(P(|E1) xP(E1) + P(E) x P(|E)]

P(E|1) = P(1|E) x P(E) [(P(1|E) xP(E) + P(E) x P(1|E1)]

P(E1|1) = P(1|E1) x P(E) [(P(1|E1) xP(E) + P(E) x P(1|E)]

By the Probability Sum Rule P(E|) +P(E1|) = 1 and P(E|1) + P(E1|1)= 1

Example 3 Bridge Girder Reliability

Monte Carlo MethodMean = 40k stdev = 8Span = 60ftPx = NORMINV(RAND() MEAN SDEV)

Px Mx FS Acceptable

1 446082 107295 24440725 0 0

2 441566 106482 24255566 0 0

3 389892 971806 22136811 1 033333

4 382186 957935 21820838 1 05

5 503165 11757 26781249 0 04

6 510352 118863 27075921 0 033333

7 350123 900222 20506192 1 042857

8 298181 806727 18376459 1 05

195 357993 914387 20828851 1 064103

196 490708 115327 26270485 0 063776

197 45738 109328 24903981 0 063452

198 392907 977233 22260429 1 063636

199 36882 933877 21272821 1 063819

200 351995 90359 20582919 1 064

128

Girder Reliability Factor = 064

Girder W36x135S = 439 in^3DL = 05 kftMEAN = 40k MDL = 2700 k-inMLL = 7200 k-inSUM = 9900 k-inFS allow = 24 ksiFS = Flexural Stress ksi

Page 2: Bayes’ Rule for the Practicing Structural Engineer

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 24STRUCTURE magazine January 201339

inputs are the number of ldquosuccessesrdquo in thesample the size of the sample the numberof successes in the population and the sizeof the population In this case a ldquosuccessrdquo isactually not detecting low-strength concreteHYPEGEOMDIS (0 5 3 30) returns thecorrect value of 0567

Example 2 ndash Weld Inspection Report

Te engineerrsquos experience indicated that10 of welds inspected by the specifiedtest method would have defects Laboratoryreports from a project indicated that 20 ofthe 50 welds inspected to date had defects(Jordaan 2005) Te engineer used BayesrsquoRule to analyze the situation E was that aflaw was present in a weld and was thatthe flaw would be detected by the speci-fied test process Te hypotheses P(E|) wasthat genuine weld flaws would be detectedBased on the engineerrsquos prior experienceP(E) = 01 Te laboratory report indicated

that P(|E) = 08 and P(1|E) = 02 Fromthe Probability Sum Rule P(E1) = 1- P(E)= 09 P(|E1) = 02 and P(1|E1) = 08Calculating the posterior probabilities byBayesrsquo Rule equations is cumbersome If thefactors are set up using a BAYES BOX (see Appendix ) the calculation is more direct andconvenient Te resulting posterior prob-abilities are identical to those calculated byusing the Bayesrsquo Rule equationso interpret the results Te engineer

expected 10 of the welds to have flawsie of the 50 welds inspected to date five

would have flaws (positive test results) Telaboratory indicated that 20 of the welds(10 of 50) had flaws Te laboratory testsdid not calculate the probabilities of falsepositives and false negatives Te BayesrsquoRule analysis calculated P(E|) = 031 theprobability that welds that tested positivewould actually have defects Of the 50 weldsexamined four welds (031 x 026 x 50 =403) would have ldquotruerdquo defects P(E1|) =069 so about nine ldquodefectiverdquo welds (069x 026 x 50 = 897) would be false positives

that is the test would have detected ninenon-existing flaws Tis was a statisticalype 1 error Since P(E|1) = 003 aboutone weld (003 x 074 x 50 = 111) had aflaw that the tests missed Tis was a statisti-cal ype 2 error Finally P(E1|1) = 097therefore the absence of flaws was correctlydetected for about 36 of the welds (097 x074 x 50 = 3589)

Te engineer would note that the combina-tion of the probabilities of false positives andfalse negatives are indicators of the strictnessof the testing system Critical projects such asnuclear power plants need tight controls eventhough they are costly in time and budgetHowever false negatives flaws that werenot detected in critical facilities could bevery hazardousIf more test data becomes available the pos-

terior probabilities are used as priors in anupdating analysis

Example 3 ndash Bridge Girder Reliability

(Monte Carlo Method)

Te Monte Carlo method is used to evaluatethe reliability R of a bridge girder subjectedto random simulated loads Te random load-ing is applied iteratively until R convergesTe number of iterations may range fromhundreds to thousands Microsoft Excel cangenerate over 30000 iterationsTe bridge girder is a W36x135 spanning

60 feet subject to a uniform dead load of05 kipsfoot and a concentrated live load

at mid-span with a mean value of 40 kipsTe engineer calculated the girder flexuralstress using 200 simulated load tests assum-ing a normal distribution with a standarddeviation equal to the mean divided by thesquare root of the number of samples butnot less than 983089983087983093 of the mean (8 kips in thiscase) If this stress was less than or equal tothe allowable value of 24 ksi then the girder

was considered acceptable Te reliabilityfactor R of the girders was calculated as theratio of the number of acceptable girders tothe total number of girders (200) (Elishakoff1999 pp 440-41) (Spreadsheet details arein the Appendix )Te results indicated a reliability factor R

of 064 which does not significantly varyupon increasing the number of iterations Teengineer was confident about the adequacy ofthe girders and assumed P(E) = 095 (priors)accordingly then used the R values as likeli-hoods in the Bayes Box analysis P(E|) is the

probability that a girder meeting or exceedingR would be acceptedTe reliability of the bridge girders under

random loading increased from 064 to 097for girders meeting both E and require-ments (about 122 of 200 girders) Howeverthe engineer noted from P(E|1) = 091 thatabout 68 of the girders were ldquofalse negativesrdquoindicating that the engineer may be overcon-fident about the test process As always theengineer ultimately decides on the accept-ability of R

able for Example 2 Weld Inspection

Hypothesis Event Priors Likelihoods ProductPosterior

Probability Number of

Welds

P(E|) E 01 08 008 031 4

P(E1|) E1 09 02 018 069 9

P()= 026

P(E|1) E 01 02 002 003 1

P(E1|1) E1 09 08 072 097 36P(1)= 074

Welds 50 50

continued on next page

Hypothesis Events Priors Likelihoods ProductPosterior

Probability Number of

Girders

P(E|) E 095 064 0608 097 122

P(E1|) E1 005 036 0018 003 4

P()= 0626

P(E|1) E 095 036 0342 091 68

P(E1|1) E1 005 064 0032 009 6

P(1)= 0374

otal Girders 200 200

able for Example 3 Bridge girder reliability

Bayes Box

P(E) = 095P(E1) = 005P(|E) = 064P(|E1) = 036

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 34STRUCTURE magazine January 201340

Example 4 ndash Office Management4A Bridge Collapse

Preliminary Assessment

A bridge was being upgraded when it col-lapsed suddenly A review of collapses ofbridges of similar construction and vintageindicated the following probabilities of vari-ous causes 02 by overload 02 by designdeficiencies 03 by construction deficien-cies 01 by inadequate maintenance and02 by other causes However the engineernoted that at the time of collapse one sideof the bridge was open to normal traffic

while the other was loaded with construc-tion equipment Accordingly the engineerestimated a probability of 04 that the failure

was due to an overload from the combina-tion of construction loads and live loadsTe other probabilities of failure were thenassumed as 02 by design deficiencies 02by construction deficiencies 01 by inad-equate maintenance and 01 by other causes

Calculate the probability P(E|) for eachcause of failureTe probability of failure due to Overload

increased from 02 to 038

4B Project Assignment

Te supervising engineer considers bothon-time performance and accuracy whenassigning a project Engineer A completed70 of assigned projects on schedule butthere were major design changes requiredduring construction on 40 of themEngineer B completed 40 of projects on

schedule and only 10 of them requiredmajor design changes during construction Assuming similar projects in scope and sched-ule duration calculate the probability thateach engineer would complete a project onschedule without major design changesEngineer A has a higher probability of com-

pleting a project on schedule and withoutmajor design changes

4C Monty Hall Problem

Suppose you are a contestant on a V gameshow and are given the choice of three doors

Behind one of the doors is a prize and behindthe other two doors are goats You pick adoor Te host who knows what is behindeach door then opens one of the other doorsshowing a goat You are allowed to changeyour door choice Assuming you want theprize do you changeUsing Bayesrsquo Rule P(E) is the probability

that the prize is behind your door = ⅓ P(E1)is the probability that the prize is behindone of the other two doors = ⅔ When thehost opens a door that reveals a goat thelikelihood probability P(|E) is the same

that the prize is behind your door vs theremaining door = frac12 Although it may seem counterintuitiveselecting the other remaining door rather

than the one you chose initially actuallyimproves your probability of winning to067 Tis example illustrates the broadapplicability of Bayesrsquo Rule and the impor-tance of using both priors and likelihoodsfor a complete analysis

Advanced Applications

Many advanced applications of BayesrsquoRule were supported by National ScienceFoundation funding and are available Teyinclude structural responses to random exci-tations decision analysis in building codesuncertainty in model analysis reliability of

damaged structures and random loadingfrom wind and seismic forces or terroristattacks Many additional articles and com-puter programs are on the Internet

Conclusions

An engineer intuit ively makes inferencesbased on available prior knowledge andrelated experimental data while reservingthe right to revise the inference based onnew information Bayesrsquos Rule is a vehiclefor organizing this approach a mathe-matical process for using experience and judgment to calculate the probabilit ies thatcould help guide engineering decisionsIt tests both the ldquopriorsrdquo and the ldquolikeli-hoodsrdquo while calculating the probabilitiesof an ldquoErdquo and ldquordquo hypothesis In practice

Cause Prior Likelihood ProductPosterior

Probability

Design 02 02 004 019

Construction 03 02 006 029

Overload 02 04 008 038

Maintenance 01 01 001 005

Other 02 01 002 010Sum 1 1 021 1

EngineerPriors

On-imeLikelihoodNo-Change Product

PosteriorProbability

A 07 06 042 054

B 04 09 036 046

Sum 078 1

Prior Likelihood Product PosteriorProbability

E 0333 05 017 033

E1 0667 05 033 067

Sum 05 1

Hypothesis Event Priors Likelihoods

P(E|) E P(E) P(|E)

P(E1|) E1 P(E1) P(|E1)

P() Sum

P(E|1) E P(E) P(1|E)

P(E1|1) E1 P(E1) P(1|E1)

P(1) Sum

Example 4A Bridge collapse

Example 4B Project assignments

Example 4C Monty Hall problem

Bayes Box for Direct Calculations

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 44STRUCTURE magazine January 201341

the engineer would evaluate several sources of information such as the qualificationsof the testing laboratory test records etc before making a critical deci sionhe premise underlying Bayesrsquo Rule as well as all education is learning from experience

and judgment Bayesrsquo Rule reminds us that attempts to predict the future responsiblyare possible only in terms of probability and that the highly improbable may occur

As always the engineer is the one who ultimately decides

References

ACI Committee 318 Building Code Requirements for Structural Concrete ACI 318-08 andCommentary American Concrete Institute Farmington Hills MI 2008

Albert J A Bayesian Primer Key College Publishing 2006

Elishakoff I Probabilistic Teory of Structures 2nd Ed Dover Publications Mineola NY1999 pp 440-41

Goldstein LJ Schneider DI and Siegel MJ Finite Mathematics and Its Applications Pearson Prentice Hall 2007 pp 273-457

Iverson GR Bayesian Statistical Inference Sage Publications Newbury Park 1984

Jordaan I Decisions Under Uncertainty Cambridge University Press 2005 pp 49-52

Mcgrayne S Te Teory Tat Would Not Die Yale University Press New Haven 2011

Appendix

Bayesrsquo Rule

E = the event E occursP(E) = the probability that event E occursE1 = the event E does not occurP(E1) = the probability that event E does

not occurE and E1 are ldquoknownrdquo based on experience

or estimated using judgment and P(E)and P(E1) are called ldquopriorsrdquoP(E) + P(E1) = 1 = a positive test resultP() =the probability that occurs1 = a negative test resultP(1) = the probability that 1 occursP() and P(1) are based on actual obser-

vations and are called ldquolikelihoodsrdquoP() + P(1) = 1Note that E and are independent eventsP(|E) = conditional probability that

occurs given that E also occurs

P(|E1) = conditional probability that occurs even though E does not occur(false positive)

P(1|E) = conditional probability that1 occurs even though E has occurred(false negative)

P(1|E1) = conditional probability that 1occurs given that E does not occur

By the Probability Sum Rule P(|E) +P(1|E) = 1 and P(|E1) + P(1|E1)= 1

By probability rules P(E|) x P( ) =P(|E) x P(E)

Rearranging P(E|) = P(|E) x P (E) P() which is Bayesrsquo Rule given P()gt 0

P() is a normalizing factor = P(E) xP(|E) + P(E1) x P(|E1)

Te usual form of Bayesrsquo Rule is P(E|) =P(|E) x P(E) [P(|E) x P(E) + P(E1)x P (|E1)]

Other forms of Bayesrsquo Rule are

P(E1|) = P(|E1) x P(E1) [(P(|E1) xP(E1) + P(E) x P(|E)]

P(E|1) = P(1|E) x P(E) [(P(1|E) xP(E) + P(E) x P(1|E1)]

P(E1|1) = P(1|E1) x P(E) [(P(1|E1) xP(E) + P(E) x P(1|E)]

By the Probability Sum Rule P(E|) +P(E1|) = 1 and P(E|1) + P(E1|1)= 1

Example 3 Bridge Girder Reliability

Monte Carlo MethodMean = 40k stdev = 8Span = 60ftPx = NORMINV(RAND() MEAN SDEV)

Px Mx FS Acceptable

1 446082 107295 24440725 0 0

2 441566 106482 24255566 0 0

3 389892 971806 22136811 1 033333

4 382186 957935 21820838 1 05

5 503165 11757 26781249 0 04

6 510352 118863 27075921 0 033333

7 350123 900222 20506192 1 042857

8 298181 806727 18376459 1 05

195 357993 914387 20828851 1 064103

196 490708 115327 26270485 0 063776

197 45738 109328 24903981 0 063452

198 392907 977233 22260429 1 063636

199 36882 933877 21272821 1 063819

200 351995 90359 20582919 1 064

128

Girder Reliability Factor = 064

Girder W36x135S = 439 in^3DL = 05 kftMEAN = 40k MDL = 2700 k-inMLL = 7200 k-inSUM = 9900 k-inFS allow = 24 ksiFS = Flexural Stress ksi

Page 3: Bayes’ Rule for the Practicing Structural Engineer

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 34STRUCTURE magazine January 201340

Example 4 ndash Office Management4A Bridge Collapse

Preliminary Assessment

A bridge was being upgraded when it col-lapsed suddenly A review of collapses ofbridges of similar construction and vintageindicated the following probabilities of vari-ous causes 02 by overload 02 by designdeficiencies 03 by construction deficien-cies 01 by inadequate maintenance and02 by other causes However the engineernoted that at the time of collapse one sideof the bridge was open to normal traffic

while the other was loaded with construc-tion equipment Accordingly the engineerestimated a probability of 04 that the failure

was due to an overload from the combina-tion of construction loads and live loadsTe other probabilities of failure were thenassumed as 02 by design deficiencies 02by construction deficiencies 01 by inad-equate maintenance and 01 by other causes

Calculate the probability P(E|) for eachcause of failureTe probability of failure due to Overload

increased from 02 to 038

4B Project Assignment

Te supervising engineer considers bothon-time performance and accuracy whenassigning a project Engineer A completed70 of assigned projects on schedule butthere were major design changes requiredduring construction on 40 of themEngineer B completed 40 of projects on

schedule and only 10 of them requiredmajor design changes during construction Assuming similar projects in scope and sched-ule duration calculate the probability thateach engineer would complete a project onschedule without major design changesEngineer A has a higher probability of com-

pleting a project on schedule and withoutmajor design changes

4C Monty Hall Problem

Suppose you are a contestant on a V gameshow and are given the choice of three doors

Behind one of the doors is a prize and behindthe other two doors are goats You pick adoor Te host who knows what is behindeach door then opens one of the other doorsshowing a goat You are allowed to changeyour door choice Assuming you want theprize do you changeUsing Bayesrsquo Rule P(E) is the probability

that the prize is behind your door = ⅓ P(E1)is the probability that the prize is behindone of the other two doors = ⅔ When thehost opens a door that reveals a goat thelikelihood probability P(|E) is the same

that the prize is behind your door vs theremaining door = frac12 Although it may seem counterintuitiveselecting the other remaining door rather

than the one you chose initially actuallyimproves your probability of winning to067 Tis example illustrates the broadapplicability of Bayesrsquo Rule and the impor-tance of using both priors and likelihoodsfor a complete analysis

Advanced Applications

Many advanced applications of BayesrsquoRule were supported by National ScienceFoundation funding and are available Teyinclude structural responses to random exci-tations decision analysis in building codesuncertainty in model analysis reliability of

damaged structures and random loadingfrom wind and seismic forces or terroristattacks Many additional articles and com-puter programs are on the Internet

Conclusions

An engineer intuit ively makes inferencesbased on available prior knowledge andrelated experimental data while reservingthe right to revise the inference based onnew information Bayesrsquos Rule is a vehiclefor organizing this approach a mathe-matical process for using experience and judgment to calculate the probabilit ies thatcould help guide engineering decisionsIt tests both the ldquopriorsrdquo and the ldquolikeli-hoodsrdquo while calculating the probabilitiesof an ldquoErdquo and ldquordquo hypothesis In practice

Cause Prior Likelihood ProductPosterior

Probability

Design 02 02 004 019

Construction 03 02 006 029

Overload 02 04 008 038

Maintenance 01 01 001 005

Other 02 01 002 010Sum 1 1 021 1

EngineerPriors

On-imeLikelihoodNo-Change Product

PosteriorProbability

A 07 06 042 054

B 04 09 036 046

Sum 078 1

Prior Likelihood Product PosteriorProbability

E 0333 05 017 033

E1 0667 05 033 067

Sum 05 1

Hypothesis Event Priors Likelihoods

P(E|) E P(E) P(|E)

P(E1|) E1 P(E1) P(|E1)

P() Sum

P(E|1) E P(E) P(1|E)

P(E1|1) E1 P(E1) P(1|E1)

P(1) Sum

Example 4A Bridge collapse

Example 4B Project assignments

Example 4C Monty Hall problem

Bayes Box for Direct Calculations

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 44STRUCTURE magazine January 201341

the engineer would evaluate several sources of information such as the qualificationsof the testing laboratory test records etc before making a critical deci sionhe premise underlying Bayesrsquo Rule as well as all education is learning from experience

and judgment Bayesrsquo Rule reminds us that attempts to predict the future responsiblyare possible only in terms of probability and that the highly improbable may occur

As always the engineer is the one who ultimately decides

References

ACI Committee 318 Building Code Requirements for Structural Concrete ACI 318-08 andCommentary American Concrete Institute Farmington Hills MI 2008

Albert J A Bayesian Primer Key College Publishing 2006

Elishakoff I Probabilistic Teory of Structures 2nd Ed Dover Publications Mineola NY1999 pp 440-41

Goldstein LJ Schneider DI and Siegel MJ Finite Mathematics and Its Applications Pearson Prentice Hall 2007 pp 273-457

Iverson GR Bayesian Statistical Inference Sage Publications Newbury Park 1984

Jordaan I Decisions Under Uncertainty Cambridge University Press 2005 pp 49-52

Mcgrayne S Te Teory Tat Would Not Die Yale University Press New Haven 2011

Appendix

Bayesrsquo Rule

E = the event E occursP(E) = the probability that event E occursE1 = the event E does not occurP(E1) = the probability that event E does

not occurE and E1 are ldquoknownrdquo based on experience

or estimated using judgment and P(E)and P(E1) are called ldquopriorsrdquoP(E) + P(E1) = 1 = a positive test resultP() =the probability that occurs1 = a negative test resultP(1) = the probability that 1 occursP() and P(1) are based on actual obser-

vations and are called ldquolikelihoodsrdquoP() + P(1) = 1Note that E and are independent eventsP(|E) = conditional probability that

occurs given that E also occurs

P(|E1) = conditional probability that occurs even though E does not occur(false positive)

P(1|E) = conditional probability that1 occurs even though E has occurred(false negative)

P(1|E1) = conditional probability that 1occurs given that E does not occur

By the Probability Sum Rule P(|E) +P(1|E) = 1 and P(|E1) + P(1|E1)= 1

By probability rules P(E|) x P( ) =P(|E) x P(E)

Rearranging P(E|) = P(|E) x P (E) P() which is Bayesrsquo Rule given P()gt 0

P() is a normalizing factor = P(E) xP(|E) + P(E1) x P(|E1)

Te usual form of Bayesrsquo Rule is P(E|) =P(|E) x P(E) [P(|E) x P(E) + P(E1)x P (|E1)]

Other forms of Bayesrsquo Rule are

P(E1|) = P(|E1) x P(E1) [(P(|E1) xP(E1) + P(E) x P(|E)]

P(E|1) = P(1|E) x P(E) [(P(1|E) xP(E) + P(E) x P(1|E1)]

P(E1|1) = P(1|E1) x P(E) [(P(1|E1) xP(E) + P(E) x P(1|E)]

By the Probability Sum Rule P(E|) +P(E1|) = 1 and P(E|1) + P(E1|1)= 1

Example 3 Bridge Girder Reliability

Monte Carlo MethodMean = 40k stdev = 8Span = 60ftPx = NORMINV(RAND() MEAN SDEV)

Px Mx FS Acceptable

1 446082 107295 24440725 0 0

2 441566 106482 24255566 0 0

3 389892 971806 22136811 1 033333

4 382186 957935 21820838 1 05

5 503165 11757 26781249 0 04

6 510352 118863 27075921 0 033333

7 350123 900222 20506192 1 042857

8 298181 806727 18376459 1 05

195 357993 914387 20828851 1 064103

196 490708 115327 26270485 0 063776

197 45738 109328 24903981 0 063452

198 392907 977233 22260429 1 063636

199 36882 933877 21272821 1 063819

200 351995 90359 20582919 1 064

128

Girder Reliability Factor = 064

Girder W36x135S = 439 in^3DL = 05 kftMEAN = 40k MDL = 2700 k-inMLL = 7200 k-inSUM = 9900 k-inFS allow = 24 ksiFS = Flexural Stress ksi

Page 4: Bayes’ Rule for the Practicing Structural Engineer

7212019 Bayesrsquo Rule for the Practicing Structural Engineer

httpslidepdfcomreaderfullbayes-rule-for-the-practicing-structural-engineer 44STRUCTURE magazine January 201341

the engineer would evaluate several sources of information such as the qualificationsof the testing laboratory test records etc before making a critical deci sionhe premise underlying Bayesrsquo Rule as well as all education is learning from experience

and judgment Bayesrsquo Rule reminds us that attempts to predict the future responsiblyare possible only in terms of probability and that the highly improbable may occur

As always the engineer is the one who ultimately decides

References

ACI Committee 318 Building Code Requirements for Structural Concrete ACI 318-08 andCommentary American Concrete Institute Farmington Hills MI 2008

Albert J A Bayesian Primer Key College Publishing 2006

Elishakoff I Probabilistic Teory of Structures 2nd Ed Dover Publications Mineola NY1999 pp 440-41

Goldstein LJ Schneider DI and Siegel MJ Finite Mathematics and Its Applications Pearson Prentice Hall 2007 pp 273-457

Iverson GR Bayesian Statistical Inference Sage Publications Newbury Park 1984

Jordaan I Decisions Under Uncertainty Cambridge University Press 2005 pp 49-52

Mcgrayne S Te Teory Tat Would Not Die Yale University Press New Haven 2011

Appendix

Bayesrsquo Rule

E = the event E occursP(E) = the probability that event E occursE1 = the event E does not occurP(E1) = the probability that event E does

not occurE and E1 are ldquoknownrdquo based on experience

or estimated using judgment and P(E)and P(E1) are called ldquopriorsrdquoP(E) + P(E1) = 1 = a positive test resultP() =the probability that occurs1 = a negative test resultP(1) = the probability that 1 occursP() and P(1) are based on actual obser-

vations and are called ldquolikelihoodsrdquoP() + P(1) = 1Note that E and are independent eventsP(|E) = conditional probability that

occurs given that E also occurs

P(|E1) = conditional probability that occurs even though E does not occur(false positive)

P(1|E) = conditional probability that1 occurs even though E has occurred(false negative)

P(1|E1) = conditional probability that 1occurs given that E does not occur

By the Probability Sum Rule P(|E) +P(1|E) = 1 and P(|E1) + P(1|E1)= 1

By probability rules P(E|) x P( ) =P(|E) x P(E)

Rearranging P(E|) = P(|E) x P (E) P() which is Bayesrsquo Rule given P()gt 0

P() is a normalizing factor = P(E) xP(|E) + P(E1) x P(|E1)

Te usual form of Bayesrsquo Rule is P(E|) =P(|E) x P(E) [P(|E) x P(E) + P(E1)x P (|E1)]

Other forms of Bayesrsquo Rule are

P(E1|) = P(|E1) x P(E1) [(P(|E1) xP(E1) + P(E) x P(|E)]

P(E|1) = P(1|E) x P(E) [(P(1|E) xP(E) + P(E) x P(1|E1)]

P(E1|1) = P(1|E1) x P(E) [(P(1|E1) xP(E) + P(E) x P(1|E)]

By the Probability Sum Rule P(E|) +P(E1|) = 1 and P(E|1) + P(E1|1)= 1

Example 3 Bridge Girder Reliability

Monte Carlo MethodMean = 40k stdev = 8Span = 60ftPx = NORMINV(RAND() MEAN SDEV)

Px Mx FS Acceptable

1 446082 107295 24440725 0 0

2 441566 106482 24255566 0 0

3 389892 971806 22136811 1 033333

4 382186 957935 21820838 1 05

5 503165 11757 26781249 0 04

6 510352 118863 27075921 0 033333

7 350123 900222 20506192 1 042857

8 298181 806727 18376459 1 05

195 357993 914387 20828851 1 064103

196 490708 115327 26270485 0 063776

197 45738 109328 24903981 0 063452

198 392907 977233 22260429 1 063636

199 36882 933877 21272821 1 063819

200 351995 90359 20582919 1 064

128

Girder Reliability Factor = 064

Girder W36x135S = 439 in^3DL = 05 kftMEAN = 40k MDL = 2700 k-inMLL = 7200 k-inSUM = 9900 k-inFS allow = 24 ksiFS = Flexural Stress ksi