{"id":420,"date":"2015-01-05T20:05:34","date_gmt":"2015-01-06T02:05:34","guid":{"rendered":"http:\/\/frees.pajarel.net\/?page_id=420"},"modified":"2015-02-20T19:09:00","modified_gmt":"2015-02-21T01:09:00","slug":"4-2-inverse-transform-image-inversedf-needed","status":"publish","type":"page","link":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/actuarial-mathematics\/interest-rate-risks-and-simulation\/4-simulation\/4-2-inverse-transform-image-inversedf-needed\/","title":{"rendered":"4.2 Inverse Transform"},"content":{"rendered":"<p> With the sequence of uniform random numbers, we next transform them to a distribution of interest. Let \\(F\\) represent a distribution function of interest. Then, use the <em>inverse transform<\/em><br \/>\n\\[<br \/>\nX_i=F^{-1}\\left( U_i \\right) .<br \/>\n\\]<br \/>\nThe result is that the sequence {\\(X_{i}\\)} is approximately i.i.d. with distribution function \\(F\\).<\/p>\n<p>To interpret the result, recall that a distribution function, \\(F\\), is monotonically increasing and so the inverse function, \\(F^{-1}\\), is well-defined. The inverse distribution function (also known as the <em>quantile function<\/em>), is defined as<br \/>\n\\begin{eqnarray*}<br \/>\nF^{-1}(y) = \\inf_x { F(x) \\ge y } ,<br \/>\n\\end{eqnarray*}<br \/>\nwhere &#8220;\\(inf\\)&#8221; stands for &#8220;infinum&#8221;, or the greatest lower bound.<\/p>\n<p>Here is a graph to help you visualize the inverse transform. When the random variable is continuous, the distribution function is strictly increasing and we can readily identify a unique inverse at each point of the distribution.<\/p>\n<figure id=\"attachment_269\" class=\"wp-caption aligncenter\" style=\"max-width: 300px;\" aria-label=\"&lt;br \/&gt;\"><a href=\"http:\/\/www.ssc.wisc.edu\/~jfrees\/wp-content\/uploads\/2015\/01\/InverseDF.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.ssc.wisc.edu\/~jfrees\/wp-content\/uploads\/2015\/01\/InverseDF-300x232.jpg\" alt=\"InverseDF\" width=\"300\" height=\"232\" class=\"alignnone size-medium wp-image-831\" srcset=\"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-content\/uploads\/2015\/01\/InverseDF-300x232.jpg 300w, https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-content\/uploads\/2015\/01\/InverseDF-1024x791.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption class=\"wp-caption-text\"><br \/><\/figcaption><\/figure>\n<p>The inverse transform result is available when the underlying random variable is continuous, discrete or a mixture. Here is a series of examples to illustrate its scope of applications.<\/p>\n<p><strong>Exponential Distribution Example.<\/strong> Suppose that we would like to generate observations from an exponential distribution with scale parameter \\(\\theta\\) so that \\(F(x) = 1 &#8211; e^{-x\/\\theta}\\). To compute the inverse transform, we can use the following steps:<br \/>\n\\begin{eqnarray*}<br \/>\ny = F(x) &#038;\\Leftrightarrow&#038; y = 1-e^{-x\/\\theta} \\<br \/>\n&#038;\\Leftrightarrow&#038; -\\theta \\ln(1-y) = x = F^{-1}(y) .<br \/>\n\\end{eqnarray*}<br \/>\nThus, if \\(U\\) has a uniform (0,1) distribution, then \\(X = -\\theta \\ln(1-U)\\) has an exponential distribution with parameter \\(\\theta\\).<\/p>\n<p><em>Some Numbers.<\/em> Take \\(\\theta = 10\\) and generate three random numbers to get<\/p>\n<table>\n<tr>\n<td>\\(U\\)<\/td>\n<td>0.26321364<\/td>\n<td>0.196884752<\/td>\n<td>0.897884218<\/td>\n<\/tr>\n<tr>\n<td>\\(X = -10\\ln(1-U)\\)<\/td>\n<td>1.32658423<\/td>\n<td>0.952221285<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<p><div class=\"alignleft\"><a href=\"https:\/\/users.ssc.wisc.edu\/~ewfrees\/actuarial-mathematics\/interest-rate-risks-and-simulation\/4-simulation\/4-1-generating-independent-uniform-observations\/\" title=\"4.1 Generating Independent Uniform Observations\">&#9668 Previous page<\/a><\/div><div class=\"alignright\"><a href=\"https:\/\/users.ssc.wisc.edu\/~ewfrees\/actuarial-mathematics\/interest-rate-risks-and-simulation\/4-simulation\/4-2-inverse-transform-image-inversedf-needed\/bernoulli-distribution\/\" title=\"Bernoulli Distribution\">Next page &#9658<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the sequence of uniform random numbers, we next transform them to a distribution of interest. Let \\(F\\) represent a distribution function of interest. Then, use the inverse transform \\[ X_i=F^{-1}\\left( U_i \\right) . \\] &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":415,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P8cLPd-6M","acf":[],"_links":{"self":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/420"}],"collection":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/comments?post=420"}],"version-history":[{"count":7,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/420\/revisions"}],"predecessor-version":[{"id":1645,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/420\/revisions\/1645"}],"up":[{"embeddable":true,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/415"}],"wp:attachment":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/media?parent=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}