You are on page 1of 62

PE 3003/6413

PE 3003/6413 Spring 2014


Chapter 4
Part 2
Economic Uncertainties
Outline
1. Range Analysis
2. Probability
3. Cumulative Probability and Density Functions
4. Expected Value
5. Decision Three Analysis
6. Distribution Functions
7. Monte Carlo Simulation
Distribution Functions
Density functions are commonly used in engineering
to describe physical systems
Density distribution of a loading in a beam





For any point x along the beam, the density can be
described by a function (in grams/cm)
The total loading between points a and b is
determined as the integral of the density function
from a to b










Distribution Functions
Common Density Functions

Uniform

Triangular Distribution

Normal Distribution

Log-Normal Distribution

Uniform Distribution
A continuous random variable X with probability density
function
Uniform Distribution
Let the continuous random variable X denote the porosity
measured in core samples. Assume that the range of X is [0,
20 %], and assume that the probability density function of X is
f(X)=0.05, 0X 20
1. What is the probability that a measurement of porosity is
between 5 and 10 %?




2. What is the mean and variance of the core samples?
E(X)= 10% and Var(X)=33.33 %
Uniform Distribution
Random Number
A set of numbers that have nothing to do with the other
numbers in the sequence
Random numbers have no defined sequence or formulation.
Thus, for any n random numbers, each appears with equal
probability
All computer languages and spread sheet has a random
function that return a random number uniformly distributed
between 0 and 1

a b
Uniform Distribution
VBA Random number initialization
Const Seed As Double = 1000
' Random numbers Seed set
Dim RndVal As Double
Randomize (Seed)
RndVal = Rnd(-Seed)

' After this command random numbers can be generated as
follows
RndVal = Rnd()
We will use this in Monte Carlo section

Uniform Distribution
Random number Generation between a and b
VBA
Function RandAB(a As Double, b As Double) As Double

RandAB = (b - a) * Rnd() + a

End Function

Excel
=rand()*(b-a)+a
Uniform Distribution
Strengths
Easy to create
Easy to understand
Simple implementation and calculation
Weakness
Almost always inappropriate, except as random number
generation
Use cautiously with low iterations (Monte Carlo)

Triangular Distribution
a
b

c

f
(
x
)

x

Triangular Distribution



Cumulative Distribution
( )
( ) ( )
( )
( ) ( )

>
< s

< s


<
= =
b x
b x c
c b a b
x b
b x a
a c a b
a x
xa x
P x F
1
1
0
) (
2
2
1. a is the minimum outcome of the random
variable.
2. c is the mode (most likely) of the random
variable.
3. b is the maximum outcome of the random
variable.
4. F(x) is the cumulative probability of all
possible outcomes of the random variable
between a and x.
Triangular Distribution
Triangular Distribution
Random numbers generation
generate a random number (P) uniformly distributed between
0 to 1 (refer to uniform distribution random numbers)
random number is calculated using the inverse of the
triangular distribution as follows:










See VBA template on WebCT
( )( )
( ) ( )( )

>
< s

< s
+
=
=
1
1
1
0
0
P b
P
a b
a c c b a b P b
a b
a c
P
a a c a b P
P
a
x
Triangular Distribution
Strengths
Easy to create
Easy to understand
Simple implementation
Weakness
Likeliest often confuse with mean or P50 and very difficult to
defend
End points are sometimes difficult to estimate
Poor approximation of Log-Normal

Normal Distribution
The most widely used model for the distribution of a
random variable
Whenever a random experiment is replicated, the random variable
that equals the average (or total) result over the replicates tends
to have a normal distribution as the number of replicates becomes
large.
Normal Distribution
Probability density function






Mean and Variance
Normal Distribution
Let the continuous random variable X denote the porosity
measured in core samples. Assume that X is normally
distributed with 10% mean and 4% variance
1. What is the probability that a measurement of porosity
exceeds 13%?

Excel => =1-NORM.DIST(13,10,SQRT(4),TRUE) = 0.06681
Normal Distribution
Probabilities associated with a normal distribution

Normal Distribution
Random numbers generation
generate a random number (P) uniformly distributed between
0 to 1 (refer to uniform distribution random numbers)
random number is calculated using the inverse of the normal
distribution as follows:
Excel
=NORM.INV(RAND(), Mean,Sigma) where p=rand()


Normal Distribution
Strengths
Easy to create
Easy to understand
Simple implementation
Weakness
Not really true nature at the ends

Log-Normal Distribution
Variables in a system sometimes follow an exponential
relationship as x=exp(w)
If the exponent is a random variable, say W, X=exp(W) is a random
variable
An important special case occurs when W has a normal
distribution. In that case, the distribution of X is called a
lognormal distribution.
Log-Normal Distribution
Probability density function






Mean and Variance
Log-Normal Distribution
Random numbers generation
generate a random number (P) uniformly distributed between
0 to 1 (refer to uniform distribution random numbers)
random number is calculated using the inverse of the normal
distribution as follows:
Excel
=LOGNORM.INV(rand(),,)

Log-Normal Distribution
Strengths
Easy to create
Easy to understand
Logical starting points for many inputs
Extremely common in nature
Weakness
Not really true nature at the ends

Binomial Distribution
Bernoulli Trial or Experiment:
Flip a coin 10 times. Let X =number of heads obtained.
A worn machine tool produces 1% defective parts. Let X
=number of defective parts in the next 25 parts
produced.
The random variable in each case is a count of the
number of trials that meet a specified criterion
Assumed that the trials that constitute the random
experiment are independent
probability of a success in each trial is constant








Binomial Distribution
A random experiment consists of n Bernoulli trials
such that
1. The trials are independent
2. Each trial results in only two possible outcomes,
labeled as success and failure
3. The probability of a success in each trial, denoted as p,
remains constant
The random variable X that equals the number of
success has a binomial random variable with
parameters n (number of trials or experiments) and
success probability p






Binomial Distribution
We are drilling 5 wildcats in a new basin where the
chance of a discovery (wildcat success ratio) is 0.15
on each well. Assuming each well is a Bernoulli trial,
what is the probability of only one discovery in the
fives wells drilled?


n=5
p=0.15
S=1
P(S=1)=0.3915
Outline
1. Range Analysis
2. Probability
3. Cumulative Probability and Density Functions
4. Expected Value
5. Decision Three Analysis
6. Distribution Functions
7. Monte Carlo Simulation
Gas Metering Problem
w
q
O
q
G
q G
P
G
T
Gas Metering Problem
The gas flow rate is measured a certain pressure and
temperature
Gas flow rate need to be reported at standard
conditions (Deterministic Model)
) 67 . 459 ( 0283 . 0
) (
+

=
G
G G
SC G
T z
P q
q
q
G(SC)
: gas flow rate at standard conditions [MSCF/D]
q
G
: gas flow rate at in-situ conditions [MCF/D]
P
G
: gas pressure [psia]
T
G
: gas temperature [F]
z: gas compressibility factor [-]. For simplicity z=0.9
Gas Metering Problem
For a given time
] [ 19 . 203
) 67 . 459 120 ( 9 . 0 0283 . 0
300 10
) (
MSCF/D =
+

=
SC G
q
q
G
: 10 [MCF/D]
P
G
: 300 [psia]
T
G
: 120 [F]
z: 0.9 (for simplicity)
Gas Metering Problem
Unfortunately q
G
, P
G
and T
G
has associated
uncertainties
0
0.1
0.2
0.3
0.4
0.5
0 10 20
f

(
q
G
)

q
G
[MCFD/D]
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
280 300 320
f

(
P
G
)

P
G
[psia]
0
0.05
0.1
0.15
0.2
0.25
100 120 140
f

(
T
G
)

T
G
[F]
q
G
is normally distributed
with mean of 10MCFD
and 1 MCFD of standard
deviation
P
G
is normally
distributed with mean of
300 psia and 3 psia of
standard deviation
T
G
is normally
distributed with
mean of 120 F and
2 F of standard
deviation
Gas Metering Problem
Uncertainties need to be propagated to get the
uncertainty in q
G
,
) 67 . 459 ( 0283 . 0
) (
+

=
G
G G
SC G
T z
P q
q
0
0.1
0.2
0.3
0.4
0.5
0 10 20
f

(
q
G
)
q
G
[MCFD/D]
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
280 300 320
f

(
P
G
)
P
G
[psia]
0
0.05
0.1
0.15
0.2
0.25
100 120 140
f

(
T
G
)
T
G
[F]
0
0.1
0.2
0.3
0.4
0.5
0 10 20
f

(
q
G
)
q
G
[MCFD/D]
Monte Carlo is used to
propagates this uncertainties
Though the Deterministic
Model
Gas Metering Problem
Assume q
G
, P
G
and T
G
are not correlated
Assume
q
G
is normally distributed with mean of 10MCFD and 1
MCFD of standard deviation
P
G
is normally distributed with mean of 300 psia and 3 psia
of standard deviation
T
G
is normally distributed with mean of 120 F and 2 F of
standard deviation

Gas Metering Problem
Follow the steps below:
1. Calculate the average q
G(SC)
using the average values for q
G
,

P
G
and T
G

2. Generate a random number following q
G
distribution
3. Generate a random number following P
G
distribution
4. Generate a random number following T
G
distribution
5. Calculate q
G(SC)
using the deterministic model
6. Repeat from steps 2 to 5 until maximum number of iterations is
reached or the average value of all calculated q
G(SC)
is close
enough to the q
G(SC)
calculated in step 1



Gas Metering Problem
Gas Metering Problem
192
194
196
198
200
202
204
0 200 400 600 800 1000 1200
A
v
e
r
a
g
e
Iterations
Convergence Plot
Simulation Deterministic Model
Gas Metering Problem
Histogram
Min 141.0443
Max 271.6897
N of classes 10
Step 13.06453288
Left Right Interval Freq Freq [frac]
141.04 154.10 [141.04-154.1] 6 0.006006006
154.10 167.16 (154.1-167.16) 22 0.022022022
167.16 180.22 (167.16-180.22) 102 0.102102102
180.22 193.28 (180.22-193.28) 185 0.185185185
193.28 206.34 (193.28-206.34) 269 0.269269269
206.34 219.40 (206.34-219.4) 222 0.222222222
219.40 232.46 (219.4-232.46) 128 0.128128128
232.46 245.52 (232.46-245.52) 52 0.052052052
245.52 258.58 (245.52-258.58) 11 0.011011011
258.58 271.64 (258.58-271.64) 2 0.002002002
Total 999 1
Gas Metering Problem
Histogram
0
0.05
0.1
0.15
0.2
0.25
0.3
Histogram
Gas Metering Problem
Average and Standard Deviation and Normal
Approximation
Average 203.28
St Deviation 20.38
Pessimistic Mean Optimistic
162.53 203.28 244.03
0.00%
10.00%
20.00%
30.00%
40.00%
50.00%
60.00%
70.00%
80.00%
90.00%
100.00%
140 160 180 200 220 240 260
F

(
q
G
(
S
C
)
qG(SC) [MSCFD]
Gas Metering Problem
Cumulative Freq Distribution
Percentile qG(SC)
2.50% 161.89
5.00% 169.61
10.00% 176.58
15.00% 182.73
20.00% 187.41
25.00% 190.97
30.00% 193.80
35.00% 196.52
40.00% 200.47
45.00% 202.97
50.00% 205.85
55.00% 208.28
60.00% 210.93
65.00% 213.48
70.00% 216.58
75.00% 219.57
80.00% 223.08
85.00% 227.71
90.00% 232.09
95.00% 239.09
97.50% 247.22
Monte Carlo Process
1. Define all the variables
Identify all the measure variables of interest (i.e. NPV, oil price,
etc.) or all variables that affect the evaluation
2. Define the variables relationships in the deterministic
projection model
Equations or other numerical calculations
3. Sort the input variables into two groups
Variables that we known with certain (represented by single
point value)
Significant unknowns will be represent by random variables
(exact value can not be specified)
4. Define random variable distributions
Usually, the best available expert is assigned to judge each
random variable
Monte Carlo Process
5. Perform the respective simulation trials
1. Calculate the deterministic average using the average values all
random variables into the deterministic equation
2. Generate a random number following the distribution of each
random variable
3. Calculate the outcome using the deterministic model
4. Repeat from steps 2 to 5 until maximum number of iterations is
reached or the average value of all calculated values in step 3 is
close enough to the calculated in step 1
6. Calculate
Plot the histogram
Expected and standard deviation value of the outcomes
Plot the cumulative frequency distribution
P90
P50
P10
P90, P50 and P10
Other disciplines
Mao-Jones, J. (2012). Decision & Risk Analysis. Merrick & Company Technical Paper.
P90, P50 and P10
Other disciplines
Holm, S. Suleymanov, V. Vanvik, N.
(2011). Shtokman flow assurance
challenges a
Systematic approach to analyze
uncertainties Part 2.15
th
Multiphase
Production Technology Conference,
Canes (2012)
P90, P50 and P10
Other disciplines
Holm, S. Suleymanov, V. Vanvik, N.
(2011). Shtokman flow assurance
challenges a
Systematic approach to analyze
uncertainties Part 2.15
th
Multiphase
Production Technology Conference,
Canes (2012)
P90, P50 and P10
Other disciplines
P10, P50 and P90 are defined as the percentile of the
outcome

This classical definition will apply if you are dealing
with
1. Facility engineers or any other engineer who is
designing an equipment
2. Flow assurance engineers
P90, P50 and P10
Petroleum Resources Management System (PRMS)
(Society of Petroleum Engineers 2007)
f

Reserves [MMBBL or BSCF]
1P
10
th

2P
50
th

3P
90
th

Proved Provable Possible
P90, P50 and P10
Petroleum Resources Management System (PRMS)
(Society of Petroleum Engineers 2007)
Low Estimate:
Conservative estimate of the quantity that will
actually be recovered from the accumulation by
a project
There should be at least 90% probability (P90)
that the quantities actually recovered will equal
or exceed the low estimate
This is the definition that will be used in this
course owing to we are working directely with
the reserves
P90, P50 and P10
Reserves [MMBBL or BSCF]
1P
10
th

Should be at least a 90%
probability that the quantities
actually recovered will equal or
exceed the estimate
P90
Low Estimate
This is the definition that will be used in this course
P90, P50 and P10
Reserves [MMBBL or BSCF]
2P
P50
there should be at least a 50%
probability that the actual
quantities recovered will equal or
exceed the 2P estimate
P90, P50 and P10
Petroleum Resources Management System (PRMS)
(Society of Petroleum Engineers 2007)
High Estimate:
Optimistic estimate of the quantity that will
actually be recovered from an accumulation by a
project
There should be at least a 10% probability (P10)
that the quantities actually recovered will equal
or exceed the high estimate
P90, P50 and P10
Reserves [MMBBL or BSCF]
3P
90
th

there should be at least
a 10% probability that
the actual quantities
recovered will equal
or exceed the 3P
estimate.
P10
This is the definition that will be used in this course
P90
P50
P90, P50 and P10
Summary: we will use
P10 = 10% sure that the value (i.e. Reserve or NPV) is
higher than P10
P90 = 90% sure that the value (i.e. Reserve or NPV) is
higher than P90
P10
NPV [MM$]
Example 1
The production of a new well can be predicted using decline curve analysis
and historical data from nearby reservoirs. The hyperbolic decline curve is
given by:
( )
| |
b
i
i Di b q q
1
0
1

+ =
Where
q = Oil flow rate [BPD]
q
0
= Initial oil flow rate (time zero) [BPD]
Di= Initial Nominal Decline [Fraction / year]
b = Hyperbolic Exponent factor (some authors use the term n)
i = integer value of the time [year].
Example 1
The net revenue of the well in a particular year i can be estimated by:
( )
( ) ( )
( ) D T O A T venue Re Net
i i i
+ = 1
) (
1. A
(i)
is the gross revenue in year i given by
( ) ( )
( )
(

+ =
Wc
Wc
WaterCost ice Pr Gas GOR ice Pr Oil days q A
i i
1
365
Wc is the water cut
2. O
(i)
is the operational cost in year I
3. D= is the depreciation in year i .
4
Capex
D =
where Capex is the initial investment and 4 years is the taxable life of the
well; T is the income tax rate
Example 1
Finally, the net present value of this well can be calculated as follows:
( )
Capex
MROR
venue Re Net
esentValue Pr Net
i
i
i

(
(

+
=

=1
) (
1
where MROR is the minimum rate of return. The well will be closed when the Net
Revenue becomes negative (NetRevenue
(i)
< 0). Thus the life of the well corresponds
to the year before the net revenue becomes less than zero. In other words the
summation will be carried out until Net Revenue becomes negative
Using this mathematical formulation, We created a user define function in excel that
can return the NPV for a well (Deterministic Model)
Example 1
Lets consider the following random variables:
1. Initial flow rate q0 is normally distributed with mean =500
and standard deviation of 30 BPD
2. Oil price is uniform distributed between 85 and 120 $/BPD
3. Gas price in uniform distributed between 2 and 6 $/Mscf
The certain variables are:
GOR 0.3 [Mscf/BBL]
WaterCost 0.13 [$/BBL]
Wc 0.5
O
(i)
301,000.00 [$]
T 0.29
MROR 0.13
Di 0.7 [1/year]
b 1.5
Capex 2,000,000 [$]
Example 1
Run a Monte Carlo simulation assuming that the random variables
are independent and not correlated
Example 2
The recoverable oil using the volumetric approach in a given
prospect is given
( )
rf
Bo
S h A
, Nr
W

=
1
758 7
|
where A is the drainage area [acres], h is the net pay [ft], is porosity [-], Sw is
the water saturation [-],Bo is the formation volume factor [bbl/stb] and rf
is the recovery factor [-]. Nr is in stb

Example 2 template contains a user define function that calculates Nr and
can be used to setup a Monte Carlo Simulation.
Example 2
Consider the following random variables
1. is porosity [-] is normally distributed with mean 0.14 and
standard deviation of 0.02
2. Sw is the water saturation [-]. Uniform distributed between 0.2
and 0.4.
3. h is the net pay [ft]. Normally distributed mean 15 and standard
deviation of 1.5 feet's
4. A is the drainage area [acres]. Lognormal distributed with =4.35 and
=0.246 (mean 80 and std of 20 Acres)
5. rf is the recovery factor [-]. Normally distributed with mean of
0.34 and standard deviation of 0.05.
6. Bo is the formation volume. Uniform distributed between 1.15
and 1.25

You might also like