logo

Applied Engineering Statistics | Questions-Answers

Solving problems using importance sampling and Markov chain Monte Carlo methods, and implementing the solutions in R programming language.

33 Pages3277 Words30 Views
   

Added on  2022-08-11

Applied Engineering Statistics | Questions-Answers

Solving problems using importance sampling and Markov chain Monte Carlo methods, and implementing the solutions in R programming language.

   Added on 2022-08-11

ShareRelated Documents
Applied Engineering Statistics
Problem 1:
Assume that the instrumental distribution g in importance
sampling with unstandardized weights is chosen such that ;
F(x)<M.g(x)
For all x and a suitable M R ,where f is the target distribution.
Problem(1.a)
A random variable X drawn with the SIR algorithm has the
distribution that converges to f as m
Define w*(x)= f (x )
g ( x)
Let x1,...................,xm be i.i.d from g and consider an even B such that ,
P(Y BX1,.........Xn)=
i=1
m
xi B ¿ w( xi)/
i=1
m
w( xi)¿
The law of large numbers shows that,

i=1
m
¿ ( xi B ) w(Xi) E { ( x B ) w( Xi)/
i=1
m
w( x )}
=
B

w ( x ) g ( x ) dx
And
Therefore,

i=1
m
w( x ) E {w( X ) }= w( x ) g( x)dx=1
Hence M-1
Applied Engineering Statistics | Questions-Answers_1
It is clear that E that E[w*(x)]=E¿]=1
E[μis*]= 1
n
i=1
n
E [h ( x ) w( xi ) ]=μ
Var[μ^* = 1
n2
i=1
n
var ( h ( xi ) w( xi ) ) =¿ 1
n ¿var(h(x)w(x)
This is the value that you are to reduce by a choice of w*(g)
You want f (x )
g ( x) to be bounded.
It is excellent to have w *(g) to be a heavier tail than f.
Avoid a rare draw from g getting a huge weight.
g should be nearly proportional to |h(x)f(x)| so that |h(x)f(x)/g(x) is
nearly a constant.
W* as defined are unstandardized weights by letting w(xi)=
w( xi)

i=1
n
w(xi)
To obtain μ^=
i=1
n
h ( x ) w (xi)
Problem (1.b)
Let X1,X2,X3,........XN be identically distributed random variables
and h a fnction such that ;
Varg(w*(x).h(x)< for all as N.
Then,
TN=def 1
N
i=1
N
h(xi)pE(h(x))
= 1
N
i=1
N
¿ ¿(i))w*(x)p→Ep(w*(x)h(x))
Applied Engineering Statistics | Questions-Answers_2
This implies that for all Ƹ >0
P(| 1
N
I=1
N
h ¿ ¿(i))w*(x)-
x

h ( x ) f ( x ) dx | )
¿ ¿
You notice that P 0as N→
The importance approach is upon the principle of exponential h(x)
with respect to density of f and can be expressed as ;
μ = h ( x ) f ( x ) dx = h( x) f ( x)
g (x).g(x) d(x)
Alternatively,
μ=
h ( x ) f ( x ) dx
f ( x)
g ( x ) dx
=
h( x ) f ( x )
g( x )
f ( x )
g ( x ) . g ( x ) d (x)
.g(x) d(x)
Where g is the importance for sampling fnction and another
density to sample successfully.
This alternative form suggest that the approach to estimating
E[h(x)] is to draw X1,X2,........Xn i.i.d from g to use;
μ = 1
N
i=1
n
h ( xi ) w( xi )
¿ ¿
Where w*(xI)= f ( xi)
g (xi) is the importance ratio.
Problem 2
> qnorm(0.95,mean=0,sd=1)
[1] 1.644854
Applied Engineering Statistics | Questions-Answers_3
> x<-rnorm(1000,mean=0,sd=1)
> hist(x,probability=TRUE)
>
> qnorm(0.95,mean=1,sd=1.414)
[1] 3.325823
> x<-rnorm(1000,mean=1,sd=1.42)
> hist(x,probability=TRUE)
Applied Engineering Statistics | Questions-Answers_4
>
>
The Weighted Variance
> x<-c(1:1000)
> w<-rpois(1000,1000)+1
> y<-x[rep(seq_along(x),w)]
> var(y)
Applied Engineering Statistics | Questions-Answers_5
[1] 83330
>
The Weighted Mean
> x<-c(1:1000)
> w<-rpois(1000,1000)+1
> y<-x[rep(seq_along(x),w)]
> mean(y)
[1] 500.6345
>
1:1000 is a set of numbers from 1 to 1000.
Wt- is some arbitrary weights .
Var(y) –is the weighted variance
Mean(y) – is the weighted mean.
Applied Engineering Statistics | Questions-Answers_6
The histogram from the weighted means and the weighted
variance is more uniformly and evenly distributed.
Problem(3a)
Applied Engineering Statistics | Questions-Answers_7
Consider P to be doubly stochastic matrix associated with the
transition probabilities of the Markov chain with N opinions.
The limiting-state probabilities are given by i= 1
N ;i=1,2,....,N
Proof:
The limiting-state probabilities are to satisfy the condition ;
i=
k

kPkj
Substitute i= 1
N ,i=1,2,......,N
The result is as follows;
1
N = 1
N
kj
1=
k
Pkj
This confirms the validity of the theorem.
The condition =P is satisfied by i= 1
N
Where ⫪=⫪P is a limiting state probabilities needed for confirmation.
Each column j of P have a simulation of 1 ,supposing that the limiting –state
probabilities are given by ⫪i= 1
N
This confirms P to be a doubly stochastic ;
Positive Negative Worse
Positive 1
3
1
3
1
3
P=
Negative 1
3
1
3
1
3
Applied Engineering Statistics | Questions-Answers_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Article | Monte Carlo Simulation
|26
|2362
|12

Statistics 630 - Assignment 7
|10
|757
|205

Probability & Statistics
|8
|1323
|339

ACST356 / ACST861 Mathematical Theory of Risk
|4
|589
|469

R Programming Modules And Program
|12
|1142
|43

Statistics 630 Assignment 3: Chapter 2 Problems and Solutions
|8
|835
|445