User talk:Swachira: Difference between revisions

From statwiki
Jump to navigation Jump to search
m (Welcome!)
 
 
Line 3: Line 3:
You will probably want to read the [[Help:Contents|help pages]].
You will probably want to read the [[Help:Contents|help pages]].
Again, welcome and have fun! [[User:WikiSysop|WikiSysop]] 20:30, 8 May 2013 (MDT)
Again, welcome and have fun! [[User:WikiSysop|WikiSysop]] 20:30, 8 May 2013 (MDT)
== Thursday 9th May 2013 Summary ==
Sampling methods:
1. '''Multiplicative Congruential Algorithm'''
This is algorithm involves three integer parameters; a, b and m, and an initial value x, known as the seed.
A sequence of numbers is defined by
x<sub>k+1</sub> = ax<sub>k</sub> + b mod m
where mod m means take the remainder after division by m.
Therefore the random values are between 0 and m inclusive.
To normalize the values, we divide by m-1, resulting in numbers uniformly distributed in the interval [0, 1].
2.'''Inverse Transform Method'''
We use this method when we want to see a certain trend in our random values, such as an exponential trend.
The steps involved in this algorithm include:
Step 1:
Take U~U[0,1]
Step 2:
Define X = F<sup>-1</sup>(U)
Where F(x) = P(X<=x) (the cdf of the distribution we wish to map our random data)
      F<sup>-1</sup>(.) denotes the function inverse of F(.)
Therefore
F(X)= P(X<=x)
    = P(F<sup>-1</sup>(U) <= x)
    = P(F(F<sup>-1</sup>(U) <= F(x))
    = P(U<= F(x))

Latest revision as of 09:31, 9 May 2013

Welcome to Wiki Course Notes! We hope you will contribute much and well. You will probably want to read the help pages. Again, welcome and have fun! WikiSysop 20:30, 8 May 2013 (MDT)

Thursday 9th May 2013 Summary

Sampling methods: 1. Multiplicative Congruential Algorithm This is algorithm involves three integer parameters; a, b and m, and an initial value x, known as the seed. A sequence of numbers is defined by xk+1 = axk + b mod m where mod m means take the remainder after division by m. Therefore the random values are between 0 and m inclusive. To normalize the values, we divide by m-1, resulting in numbers uniformly distributed in the interval [0, 1].

2.Inverse Transform Method We use this method when we want to see a certain trend in our random values, such as an exponential trend. The steps involved in this algorithm include: Step 1: Take U~U[0,1]

Step 2: Define X = F-1(U) Where F(x) = P(X<=x) (the cdf of the distribution we wish to map our random data)

     F-1(.) denotes the function inverse of F(.)

Therefore F(X)= P(X<=x)

   = P(F-1(U) <= x)
   = P(F(F-1(U) <= F(x))
   = P(U<= F(x))