### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# Data Analysis in Engnr&Nat Sci C&PE 940

KU

GPA 3.83

### View Full Document

## 27

## 0

## Popular in Course

## Popular in Chemical & Petroleum Engr

This 17 page Class Notes was uploaded by Noble Bednar on Monday September 7, 2015. The Class Notes belongs to C&PE 940 at Kansas taught by Staff in Fall. Since its upload, it has received 27 views. For similar materials see /class/182448/c-pe-940-kansas in Chemical & Petroleum Engr at Kansas.

## Similar to C&PE 940 at KU

## Popular in Chemical & Petroleum Engr

## Reviews for Data Analysis in Engnr&Nat Sci

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/07/15

APPLICATIONS OF BAYES THEOREM CampPE 940 21 September 2005 Geoff Bohling Assistant Scientist Kansas Geological Survey geoffkgskuedu 8642093 Notes overheads Excel example le available at httppeoplekuedugbohlingcpe940 Development of Bayes Theorem Terminology PA Probability of occurrence of eventA marginal PB Probability of occurrence of event B marginal PAB Probability of simultaneous occurrence of events A and B joint PAB Probability of occurrence of A given that B has occurred conditional PBA Probability of occurrence of B given that A has occurred conditional Relationship of joint probability to conditional and marginal probabilities PABPABPB or PAB PBAPA So PABPB PBAPA Rearranging gives simplest statement of Bayes theorem P A B P B PA Often B represents an underlying model or hypothesis and A represents observable consequences or data so Bayes theorem can be written schematically as Pm0deldata 0c Pdatam0delPm0del This lets us turn a statement about the forward problem Pdalam0del probability of obtaining observed data given certain model into statements about the corresponding inverse problem Pm0deldala probability that certain model gave rise to ob served data as long as we are willing to make some guesses about the probability of occurrence of that model Pm0del prior to taking the data into account Or graphically Bayes theorem lets us turn information about the probability of different effects from each possible cause I effects A i 0 into information about the probable cause given the observed effects cause B 0 possible observed causes B effects A O 0 Illustration styled after Sivia 1996 Figure 11 Assume that B represents one of 11 possible mutually exclusive events and that the conditional probability for the occurrence of A given that B has occurred is PAB In this case the total probability for the occurrence of A is PltAgt 21PAlePBi and the conditional probability that event B has occurred given that eventA has been observed to occur is given by PBA P AlBiPBz PABiPBz PABJPBJ PM That is if we assume that event A arises with probability PAB from each of the underlying states 3 i1 n we can use our observation of the occurrence of A to update our a priori assessment of the probability of occurrence of each state PB to an improved aposleriori estimate PBiA39 DiscreteProbability Example DolomiteShale Discrimination Using Gamma Ray Log Threshold Reservoir with dolomite pay zones and shale nonpay zones Gamma ray log Measures natural radioactivity of rock measured in API units Shales Typically high gamma ray l lO API units due to abundance of radioactive isotopes in clay minerals somewhat lower in this reservoir 80 API units due to high silt content Dolomite Typically low gamma ray lO15 API units but some hot intervals due to uranium Can characterize gamma ray distribution for each lithology based on core samples from wells in eld Dolomite Shale Mean 258 852 Std Dev 186 149 Count 476 295 Gamma ray distributions for dolomite and shale 004 dolomite 0 o o I 002 Probability Density 001 I l I l 0 20 40 60 80 100 120 140 160 Gamma Ray API Units Will use these distributions to predict lithology from gamma ray in uncored wells rst using a simple rule if GammaRay gt 60 call the logged interval a shale if GammaRay lt 60 call it a dolomite Using Bayes rule we can determine the posterior probability of occurrence of dolomite and shale given that we have actually observed a gamma ray value greater than 60 Let s de ne events amp probabilities as follows A GammaRay gt 60 Bl occurrence of dolomite Bzz occurrence of shale PBl prior probability for dolomite based on overall prevalence E 60 476 of 771 core samples 1332 prior probability for shale based on overall prevalence E 40 295 of 771 core samples PABl probability of GammaRay gt 60 in a dolomite 7 34 of 476 dolomite samples PABz probability of GammaRay gt 60 in a shale 95 280 of 295 shale samples Then the denominator in Bayes theorem the total probability of A is given by PA PA31 PBl PABZPBZ 007 060 095 040 0422 If we measure a gamma ray value greater than 60 at a certain depth in a well then the probability that we are logging a dolomite interval is 2010 PB IA PABIPB1 007 060 1 PM 0422 and the probability that we are logging a shale interval is PABPB 095 040 PUMA Z PA 0422 090 Thus our observation of a high gamma ray value has changed our assessment of the probabilities of occurrence of dolomite and shale from 60 and 40 based on our prior estimates of overall prevalence to 10 and 90 We can do simple sensitivity analysis with respect to prior probabilities For example if we take prior probability for shale to be 20 meaning prior for dolomite is 80 then get posterior probability of 77 for shale 23 for dolomite if the gamma ray value is greater than 60 API un1ts ContinuousProbability Example DolomiteShale Discrimination Using Gamma Ray Density Functions It is also possible to formulate Bayes theorem using probability density functions in place of the discrete probabilities PAB We could represent the probability density function that a continuous variable X follows in each case as fxBi or more compactly fx Then PBix 12f ltxgtPltBjgt That is if we can characterize the distribution of X for each category B we can use the above equation to compute the probability that event B has occurred given that the observed value of X is x For example based on the observed distribution of gamma ray values for dolomites and shales a gamma ray measurement of 110 API units almost certainly arises from a shale interval because the probability density function for gamma ray in dolomites evaluated at 110 API units f 1 x1 10 is essentially O This form of Bayes theorem lets us develop a continuous mapping from gamma ray value to posterior probability ShaleDolomite Discrimination Using Normal Density Functions Dolomite 1 Shale 2 Mean Y 258 852 Std DeV s 186 149 Count 476 295 f1 x Sl eXp x f1 2 2s12 f2x expxf22ZS Normal Approximations for Gamma Ray Distributions 004 Kernel density estimate Normal density estimate 003 a 39 5 dolomite o E 002 5 N 0 2 n 001 39 000 l l l l 5 30 55 80 105 130 155 Gamma Ray API Units Let q2 PBz represent prior probability for shale prior for dolomite is then PB 1 l qz Let p2x PBzx represent posterior probability for shale posterior for dolomite is then PBlx l p2x So posterior probability for shale given that the observed gamma ray value x is x q2f2x p2 1 612f1xq2f2x Shale Occurrence Probability Using Normal Densities 1 1 005 10 E g 09 0396 004 A E 04 g 3 0398 02 prior probability for shale used v to compute posterior 39U 07 39 g I 003 a m 0 6 3 2 I quotquotx E gt m g 05 5 g i v 002 a 3 04 39 g quot quot clff h I n E t norma p or s a e g 2 03 f normal pdf for x 139 a o 3 u39 dolomite x If a 8 0239 001 n I o 0 1 3 a 39 Q 0 U 39 h I i 000 596 0 50 100 150 Gamma Ray API Units Bayes rule allocation Assign observation to class with highest posterior probability For base case prior of 40 for shale 50 posterior probability point occurs at gamma ray of 596 a so Bayes rule allocation leads to basically same results as thresholding at 60 API units But now have means for converting gamma ray to continuous shale probability log 2010 5 2010 2020 E 2020 2030 2030 E 2040 E 2040 a a g g 2050 2050 7 7 D 2000 D 2000 2070 2070 2080 2080 2090 2090 30 00 90 120 0 02 4 0 0810 Gamma Ray API units Posterior Probabilityfor Shale ShaleDolomite Discrimination Using Kernel Density Estimates No need to restrict approach to just normal densities Could use any other form of probability density function for each category including the kernel density estimates shown initially Shale Occurrence Probability Using Kernel Densities 005 1D kernel pdffor E sandstone 004 g 08 quot EL 39 prior probability for shale used 5 r u to compute posterior 39 003 a 06 5 39 39 a quot 39 39 39x g I a 39 0 02 a 04 a kernel pdf for shale 39 n l I 5 i a 39 8 0 2 quot 001 393 39 quot 3 u 3 0U 39i39 a I 000 0 100 150 Gamma Ray API Units Probability Density dashed lines Relationship to Discriminant Analysis Could just as easily use multivariate density functions in Bayes theorem For example could be discriminating facies based on a vector of log measurements x rather than a single log If use multivariate normal density functions for each class Bayes rule allocation leads to classical discriminant analysis Assuming covariance matrices all equal for different classes leads to linear discriminant analysis Bayes rule allocation draws linear boundaries between classes in X space Assuming unequal covariance matrices leads to quadratic discriminant analysis Bayes rule allocation draws quadratic boundaries between classes mama V mu m 4vm3 m M mum n d E mlywmmmxumwm new IHE q anuna mmv m W1 um mm3 LCMVr1nl R Y y V W 1 Y l MJM 2 E m a H n 395quot mm quot 72quotETEUJFMK 2 2 mm m 239 Pnnnavmbmsnm nvwmmmwahm quotswarmbmnnmquamu 6qu m2

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.