Solutions to Background Knowledge Probe, Due August 27, 2010 Math 489/889, Stochastic Processes and Advanced Mathematical Finance Steven R. Dunbar Department of Mathematics and Statistics University of Nebraska-Lincoln Lincoln, NE 68588, sdunbar@unl.edu www.math.unl.edu/~sdunbar
<Text-field style="Heading 1" layout="Heading 1">Problem 1</Text-field> \134item % Present value calculations Suppose that you win $10,000 in the Nebraska Lottery Mega Millions game. Your financial advise gives you the choice of the following payouts for the prize. \134begin{enumerate} \134item \134$10,000 now \134item \134$10,300 1 years from now \134item \134$245 a year forever, starting now \134item \134$1,025 for each of the of the next ten years \134end{enumerate} Which is the most valuable prize in terms of present value? Assume the interest rate is 3\134% and is compounded continuously (roughly the est available rate at the time of writing this probe.) with(finance); Ny5JLWFtb3J0aXphdGlvbkc2IkkoYW5udWl0eUdGJEktYmxhY2tzY2hvbGVzR0YkSSpjYXNoZmxvd3NHRiRJLmVmZmVjdGl2ZXJhdGVHRiRJLGZ1dHVyZXZhbHVlR0YkSS9ncm93aW5nYW5udWl0eUdGJEkyZ3Jvd2luZ3BlcnBldHVpdHlHRiRJLGxldmVsY291cG9uR0YkSStwZXJwZXR1aXR5R0YkSS1wcmVzZW50dmFsdWVHRiRJMHlpZWxkdG9tYXR1cml0eUdGJA== (a) Has a present value of $100,000 QyQ+SSJyRzYiJCIiJCEiIyIiIg== JCIiJCEiIw== apr := effectiverate(r, infinity); JCIpTVhYSSEiKg== apr_direct := exp(r)-1; JCIpTVhYSSEiKg== PVb := presentvalue( 10300, apr, 1); JCIrJioqKWUmKioqISIn PVb_direct := 10300/exp(r*1); JCIrJioqKWUmKioqISIn PVc := perpetuity(245, apr); JCIrWCJ6Wi8pISIn PVc_direct := sum( 245/exp(r)^n, n = 1..infinity); JCIrWCJ6Wi8pISIn PVd := annuity(1025, apr, 10); JCIrSzRAQigpISIn PVd_direct := sum( 1025/exp(r*n), n = 1..10); JCIrVDRAQigpISIn
restart;
<Text-field style="Heading 1" layout="Heading 1">Problem 2</Text-field> \134item %Interest calculations A investment of \134$232 will be worth \134$312.18 in 2 years. What is the annual interest rate assuming quarterly compounding? Assuming continuously compounded interest? apr := fsolve( 312.18 = 232.0*(1 + r/4)^8, r = 0..1); # note the need for the interval to coach Maple to find positive solutions JCIrQ0Y0NzohIzU= apr := fsolve( 312.18 = 232.00*exp(2*r), r); JCIra0dAJVsiISM1
restart;
<Text-field style="Heading 1" layout="Heading 1">Problem 3</Text-field> \134item %Calculating binomial probabilities Each day a stock moves up one point or down one point with probabilities $1/3$ and $2/3$ respectively. What is the probability that after 4 days, the stock will have returned to its original price? Assume the daily price fluctuations are independent events. The stock can return to its original price if and only in the four days, it has increased twice and decreased twice. That is, out of four independent trials we have 2 successes (up days) and consequently 2 failures (down days). prob := stats[statevalf,pf,binomiald[4,1/3]](2); JCIrakgnSCdIISM1 prob_direct := binomial(4,2)*(1/3)^2*(2/3)^2; IyIiKSIjRg== evalf(%); JCIrakgnSCdIISM1
restart;
<Text-field style="Heading 1" layout="Heading 1">Problem 4</Text-field> \134item % Calculating binomial and geometric probabilities Consider a roulette wheel consisting of 38 numbers, $1$ through $36$, $0$ and double $0$. If Bond always bets that the outcome will be one of the numbers $1$ through $12$, what is the probability that Bond will lose his first $5$ bets? What is the probability that his first win will occur on his fifth bet? prob_5_losses := ((38-12)/38)^5; IyInJEhyJCIoKjR3Qw== evalf(%); JCIrJip5XSpcIiEjNQ== prob_win_on_5 := ((38-12)/38)^4*(12/38); IyInbTg8IigqNHdD evalf(%); JCIrcmMhMyNwISM2
restart;
<Text-field style="Heading 1" layout="Heading 1">Problem 5</Text-field> \134item % Calculating normal probabilities If $X$ is a normal random variable with parameters $\134mu = 10$ and $\134sigma^2 = 36$, compute \134begin{enumerate} \134item $\134Pr[ X > 5]$ \134item $\134Pr[4 < X < 16]$ \134item $\134Pr[X < 8]$ \134item $\134Pr[X < 20]$ \134item $\134Pr[X > 16]$ \134end{enumerate} Pra := 1 - stats[statevalf,cdf,normald[10, 6]](5); JCIrIT47bih6ISM1 Prb := stats[statevalf,cdf,normald[10, 6]](16) - stats[statevalf,cdf,normald[10, 6]](4); JCIrQVwqbyNvISM1 Prc := stats[statevalf,cdf,normald[10, 6]](8); JCIrLU1UJXAkISM1 Prd := stats[statevalf,cdf,normald[10, 6]](20); JCIreGs0QSYqISM1 Pre := 1 - stats[statevalf,cdf,normald[10, 6]](16); JCIrUkRiJ2UiISM1
restart;
<Text-field style="Heading 1" layout="Heading 1">Problem 6</Text-field>
\134item % Using normal approximation to the binomial In $10,000$ independent tosses of a coin, the coin landed heads $5800$ times. Is it reasonable to assume the coin is not fair? Explain. mu := 10000/2; sigma := sqrt(10000*(1/2)*(1/2)); IiUrXQ== IiNd Z := (5432 - mu)/sigma; IyIkOyMiI0Q= significance := 1 - stats[statevalf,cdf,normald[0, 1]](16); JCIiIUYj It is reasonable to believe the coin is not fair. The coin came up heads more than 16 standard deviations away from the mean, an event that is virtually impossible under the null hypothesis that the coin is fair. restart;
<Text-field style="Heading 1" layout="Heading 1">Problem 7</Text-field> Suppose that $X$ is a random variable having the probability density function $$ f(x) = \134begin{cases} R x^{R-1} & \134text{ for $0 \134le x \134le 1$} \134\134 0 & \134text{ elsewhere } \134end{cases} $$ \134begin{enumerate} \134item Determine the mean $E[X]$. \134item Determine the variance $\134Var[X]$ \134item Determine the standard deviation. \134end{enumerate} assume( R > 0); density := R*x^(R-1); KiZJI1J8aXJHNiIiIiIpSSJ4R0YkLCZGI0YlISIiRiVGJQ== check_density := int( density, x = 0..1); IiIi mean := int( x*density, x = 0..1); KiYsJkkjUnxpckc2IiIiIkYmRiYhIiJGJEYm variance := int( (x - mean)^2 * density, x = 0..1); KihJI1J8aXJHNiIiIiIsJkYjRiVGJUYlISIjLCZGI0YlIiIjRiUhIiI= standard_deviation := sqrt( variance); KiYsJkkjUnxpckc2IiIiIkYmRiYhIiIqJkYkRiYsJkYkRiYiIiNGJkYnI0YmRio=
<Text-field style="Heading 1" layout="Heading 1">Problem 8</Text-field> \134item %Calculating moments and variances. %Adapted from Problem 40, page 78 of S. Ross, {\134it Introduction % to Probability Models}, S. Ross, Academic Press, 1985. If $X$ is a uniformly distributed random variable over $(0,1)$, then calculate $E[X^n]$ and $\134Var[X^n]$ for $n=1,2,3,\134dots$ assume(n, posint); nth_moment := int( x^n, x = 0..1); KiQsJkkjbnxpckc2IiIiIkYmRiYhIiI= nth_variance := int( (x^n - nth_moment)^2, x = 0..1); KigsJkkjbnxpckc2IiIiIkYmRiYhIiNGJCIiIywmRiZGJkYkRighIiI= subs( n = 1, nth_variance); IyIiIiIjNw== JSFH