In: Statistics and Probability
The Probability Integral Transformation Theorem states the following: Let X have continuous cdf FX(x) and define the random variable U as U = FX(x). Then U is uniformly distributed on (0,1), i.e., P(U ≤ u) = u, 0 < u < 1. This theorem can be used to generate random variables with an arbitrary continuous distribution function F, if F ^−1 is explicitly known. To illustrate how the method works, you will generate 1,000 random numbers from an Exponential(λ) distribution with rate λ, by following the next 4 steps:
1. Write the c.d.f., FX(x), for X ∼ Exp(3), where 3 is the rate or inverse-scale parameter.
2. Find the inverse-cdf, F ^−1 X , where F ^−1 x (U) = X
3. Generate a uniform random variable U
4. Return X ← F ^−1 X (U)
We have pdf for Exponential() given as :
Step1 :
We have cdf for Exponential() given as :
For X ∼ Exp(3), where 3 is the rate or inverse-scale parameter.
Step 2:
Finding the inverse-cdf :
Step 3 :
Now, we generate 1000 values from U(0,1)
and find the 1000 random numbers from the Exponential(3) using the relation :
where i = 1,2,3,4,............1000
Step 4 :
So, Generated random numbers are :
Note : Since all 1000 values cannot be pasted here as answer cannot be longer than 65000 characters, First 100 values are pasted.
S.no | Ui | xi = (1/-3)*ln(1-Ui) |
1 | 0.2617 | 0.4468 |
2 | 0.8781 | 0.0433 |
3 | 0.2308 | 0.4888 |
4 | 0.9478 | 0.0179 |
5 | 0.8306 | 0.0619 |
6 | 0.5039 | 0.2285 |
7 | 0.7492 | 0.0962 |
8 | 0.0273 | 1.2001 |
9 | 0.2206 | 0.5039 |
10 | 0.8487 | 0.0547 |
11 | 0.9693 | 0.0104 |
12 | 0.2071 | 0.5249 |
13 | 0.3503 | 0.3497 |
14 | 0.8838 | 0.0412 |
15 | 0.2960 | 0.4058 |
16 | 0.8159 | 0.0678 |
17 | 0.1033 | 0.7568 |
18 | 0.8499 | 0.0542 |
19 | 0.8337 | 0.0606 |
20 | 0.5602 | 0.1931 |
21 | 0.7996 | 0.0745 |
22 | 0.9669 | 0.0112 |
23 | 0.8827 | 0.0416 |
24 | 0.1610 | 0.6088 |
25 | 0.9121 | 0.0307 |
26 | 0.4105 | 0.2968 |
27 | 0.6326 | 0.1527 |
28 | 0.3978 | 0.3073 |
29 | 0.5574 | 0.1948 |
30 | 0.9640 | 0.0122 |
31 | 0.8339 | 0.0605 |
32 | 0.2181 | 0.5077 |
33 | 0.7942 | 0.0768 |
34 | 0.2486 | 0.4639 |
35 | 0.7307 | 0.1046 |
36 | 0.0666 | 0.9029 |
37 | 0.2590 | 0.4503 |
38 | 0.9416 | 0.0201 |
39 | 0.0323 | 1.1440 |
40 | 0.0927 | 0.7930 |
41 | 0.1711 | 0.5885 |
42 | 0.8854 | 0.0406 |
43 | 0.2094 | 0.5212 |
44 | 0.3892 | 0.3146 |
45 | 0.2379 | 0.4786 |
46 | 0.4974 | 0.2328 |
47 | 0.8916 | 0.0382 |
48 | 0.9228 | 0.0268 |
49 | 0.4920 | 0.2364 |
50 | 0.3830 | 0.3199 |
51 | 0.6516 | 0.1428 |
52 | 0.3083 | 0.3923 |
53 | 0.5915 | 0.1750 |
54 | 0.5614 | 0.1924 |
55 | 0.9539 | 0.0157 |
56 | 0.0858 | 0.8185 |
57 | 0.6132 | 0.1630 |
58 | 0.2081 | 0.5232 |
59 | 0.5519 | 0.1981 |
60 | 0.6563 | 0.1404 |
61 | 0.8731 | 0.0452 |
62 | 0.3216 | 0.3782 |
63 | 0.1126 | 0.7280 |
64 | 0.5306 | 0.2113 |
65 | 0.8016 | 0.0737 |
66 | 0.2200 | 0.5047 |
67 | 0.3518 | 0.3482 |
68 | 0.0501 | 0.9978 |
69 | 0.4080 | 0.2988 |
70 | 0.2744 | 0.4310 |
71 | 0.4599 | 0.2589 |
72 | 0.2342 | 0.4838 |
73 | 0.3637 | 0.3372 |
74 | 0.7841 | 0.0811 |
75 | 0.1000 | 0.7674 |
76 | 0.9104 | 0.0313 |
77 | 0.2352 | 0.4825 |
78 | 0.4010 | 0.3046 |
79 | 0.7597 | 0.0916 |
80 | 0.7845 | 0.0809 |
81 | 0.8998 | 0.0352 |
82 | 0.0098 | 1.5419 |
83 | 0.7373 | 0.1016 |
84 | 0.6061 | 0.1669 |
85 | 0.6733 | 0.1319 |
86 | 0.4678 | 0.2532 |
87 | 0.5447 | 0.2025 |
88 | 0.0865 | 0.8158 |
89 | 0.1825 | 0.5670 |
90 | 0.1144 | 0.7228 |
91 | 0.0067 | 1.6663 |
92 | 0.7242 | 0.1076 |
93 | 0.5125 | 0.2228 |
94 | 0.4523 | 0.2645 |
95 | 0.8397 | 0.0582 |
96 | 0.1951 | 0.5447 |
97 | 0.6610 | 0.1380 |
98 | 0.9107 | 0.0312 |
99 | 0.9891 | 0.0037 |
100 | 0.4639 | 0.2560 |