### Question of the Day #18

Here is a very very interesting question involving probability that a student saw in her tutorial and asked me. Here it is 🙂

A student is concerned about her car and does not like dents. When she drives to school, she has a choice of parking it on the street in one space, parking it on the street and taking up two spaces, or parking in the lot.
If she parks on the street in one space, her car gets dented with probability 0.1.
If she parks on the street and takes two spaces, the probability of a dent is 0.02 and the probability of a $15 ticket is 0.3. Parking in a lot costs$5, but the car will not get dented.
If her car gets dented, she can have it repaired, in which case it is out of commission for 1 day and costs her $50 in fees and cab fares. She can also drive her car dented, but she feels that the resulting loss of value and pride is equivalent to a cost of$9 per school day.
She wishes to determine the optimal policy for where to park and whether to repair the car when dented in order to minimize her (long-run) expected average cost per school day. What should the student to maximise her utility (minimise her cost)?

This is an interesting question, I guess its good to know some JCs are trying to introduce decision making process in teaching probability.

I’ll post a solution here soon. But to start off, we observe that we have two states here and student has 4 decisions. Have fun! 🙂

### Combinatorics related articles

Here is a compilation of all the Combinatorics articles KS has done. Students should read them when they are free to improve their mathematics skills. They will come in handy! 🙂

### 2002 A-level H2 Mathematics Paper 2 Question 30 Suggested Solutions

All solutions here are SUGGESTED. Mr. Teng will hold no liability for any errors. Comments are entirely personal opinions.

(a)
(i)
$\frac{7 \times 6 \times 5}{7 \times 7 \times 7} = \frac{30}{49}$
Alternatively, $\frac{^7 P_3}{7^3}$

(ii)
When $n=4$, required probability $= \frac{^7 P_4}{7^3} = \frac{7 \times 6 \times 5 \times 4}{7 \times 7 \times 7 \times 7} = \frac{120}{343}$

(b)
Key GC with either sequence or use table functions.
We want to solve $\frac{^12 C_n \times n!}{12^n} \textless \frac{1}{2}$
Plot $y_1 = \frac{^12 C_x \times x!}{12^x}$ and check for the x that gives a corresponding $y_1$ value that is less than $\frac{1}{2}$

(c)
When $n =21$, probability that all 21 people have different birthdays $= \frac{^365 P_21}{365^21} = 0.55631$

Probability that all 21 people have different birthdays $= \frac{^365 P_23}{365^23} = 0.4927$

Thus, when $n =23$, probability that at least two of the people are the same birthday $= 1 - 0.4927 = 0.5073$ (more than $\frac{1}{2}$)

### KS Comments:

A very interesting probability question here. This show show counter intuitive probability is! The results shows that the we can expect to find someone with the same birthday in a room of 23, more than half the time.

### 2010 A-level H2 Mathematics (9740) Paper 2 Question 7 Suggested Solutions

All solutions here are SUGGESTED. Mr. Teng will hold no liability for any errors. Comments are entirely personal opinions.

(i)
$\mathrm{P}(A|B') = \frac{\mathrm{P} (A \cap B')}{\mathrm{P}(B')}$
$\Rightarrow \mathrm{P} (A \cap B') = 0.8 \times (1-0.6) = 0.32$

(ii)
$\mathrm{P}(A \cup B) = \mathrm{P}(A \cap B') + \mathrm{P}(B) = 0.32 + 0.6 = 0.92$

(iii)
P(B’|A) $= \frac{\mathrm{P} (B' \cap A)}{\mathrm{P}(A)} = \frac{0.32}{0.7}= 0.457$

(iv)
$\mathrm{P} (A' \cap C) = \mathrm{P} (A')\mathrm{P} (C)$ since A and C are independent
$\Rightarrow \mathrm{P} (A' \cap C) = 0.15$

(v)
$0 \le \mathrm{P} (A' \cap B \cap C) \le 0.15$

### 2015 A-level H2 Mathematics (9740) Paper 2 Question 9 Suggested Solutions

All solutions here are SUGGESTED. Mr. Teng will hold no liability for any errors. Comments are entirely personal opinions.

(i)
$\mathrm{P}(B|A) = \mathrm{P}(B)$ since A and B are independent.

$\therefore, \mathrm{P}(B|A) = \mathrm{P}(B) = 0.4$

(ii)
$\mathrm{P}(A' \cap B' \cap C')$

$= 1 - \mathrm{P}(C \cup B \cup A)$

$= 1 - (0.45 + 0.02 + 0.2 + 0.145)$

$= 0.185$

(iii)

If $\mathrm{P}(A' \cap B' \cap C) = 0$,

$\mathrm{P}(A' \cap B' \cap C')$

$=1 - [0.935 - (0.3 - 0.035 )]$

$= 0.33$ (maximum)

If $\mathrm{P}(A' \cap B \cap C) = 0$,

$\mathrm{P}(A' \cap B' \cap C')$

$= 1 - \mathrm{P}(A \cup B \cup C) - 0.22$

$= 0.165$ (minimum)

$0.165 \le \mathrm{P}(A' \cap B' \cap C') \le 0.33$

### Financial Engineering (I)

Before attempting to read what we have here, students should revise their basic probability and linear algebra first.

Financial Engineering (I) #1 – Overview
Financial Engineering (I) #2 – Introduction to No Arbitrage
Financial Engineering (I) #3 – Interest rates and fixed income instruments
Financial Engineering (I) #4 – Floating Rate Bonds and Term Structure of Interest Rates
Financial Engineering (I) #5 – Forward Contracts
Financial Engineering (I) #6 – Swaps
Financial Engineering (I) #7 – Futures
Financial Engineering (I) #8 – Options
Financial Engineering (I) #9 – Options Pricing
Financial Engineering (I) #10 – The 1-Period Binomial Model
Financial Engineering (I) #11 – Option Pricing in the 1-Period Binomial Model
Financial Engineering (I) #12 – The Multi-Period Binomial Model
Financial Engineering (I) #13 – Pricing American Options
Financial Engineering (I) #14 – Replicating Strategies
Financial Engineering (I) #15 – Dividends, Pricing in the Binomial Model
Financial Engineering (I) #16 – Black-Scholes Model
Financial Engineering (I) #17 – Introduction to Term Structure Lattice Models
Financial Engineering (I) #18 – Cash Account and Pricing Zero-Coupon Bonds
Financial Engineering (I) #19 – Fixed Income Derivatives (1)
Financial Engineering (I) #20 – Fixed Income Derivatives (2)
Financial Engineering (I) #21 – The Forward Equation
Financial Engineering (I) #22 – Model Calibration
Financial Engineering (I) #23 – Pricing in a Black-Derman Toy Model
Financial Engineering (I) #24 – Modelling and Pricing Default-able bonds
Financial Engineering (I) #25 – Credit Default Swaps and Pricing Credit Default Swaps
Financial Engineering (I) #26 – Mortgage Mathematics and Mortgage-Backed Securities
Financial Engineering (I) #27 – Prepayment Risks and Pass-Throughs
Financial Engineering (I) #28 – Principal-Only and Interest Only Mortgaged-Backed Securities
Financial Engineering (I) #29 – Collateralised Mortgage Obligations
Financial Engineering (I) #30 – Pricing Mortgage-Backed Securities

### Geometric Brownian Motion

This is really important for anyone interested in Finance Modelling. As what the movie Wolf on Wall Street says:

They are referring to a geometric brownian motion.

Firstly, we will begin with the definitions.

We say that a random process, $X_t$, is a geometric Brownian motion (GBM) if for all $t \ge 0$
$X_t = e^{(\mu - \frac{\sigma^2}{2})t} + \sigma W_t$
where $W_t$ is a Standard Brownian Motion
Here $\mu$ is the drift and $\sigma$ is the volatility. We write $X_t \sim GBM (\mu, \sigma)$

Also note that
$X_{t+s}$
$= X_0 e^{(\mu - \frac{\sigma^2}{2})(t+s) + \sigma W_{t+s}}$
$= X_0 e^{(\mu - \frac{\sigma^2}{2})(t+s) + \sigma W_{t} + (\mu - \frac{\sigma^2}{2})s + \sigma (W_{t+s} - W_t)}$; This is a common technique for solving expectations.
$= X_t e^{(\mu - \frac{\sigma^2}{2})(s) + \sigma (W_{t+s} - W_t)}$. This is very useful for simulating security prices.

Consider $\mathbb{E}_t [X_{t+s}]$

$\mathbb{E}_t [X_{t+s}]$
$= \mathbb{E}_t [X_{t}e^{(\mu - \frac{\sigma^2}{2})s + \sigma(W_{t+s} - W_t)}]$; Notice this expansion is similar to before.
$= X_t e^{(\mu - \frac{\sigma^2}{2})s} \mathbb{E}^t [e^{\sigma (W_{t+s} - W_t)}]$
$= X_t e^{(\mu - \frac{\sigma^2}{2})s} e^{\frac{\sigma^2}{2}s}$
$= e^{\mu s} X_t$
This result tells us that the expected growth rate of $X_t$ is $\mu$.

From the definitions of Brownian Motion introduced earlier, we extend them to Geometric Brownian motion.
1. Fix $t_1, t_2, \ldots , t_n$. Then $\frac{X_{t_2}}{X_{t_1}}, \frac{X_{t_3}}{X_{t_2}}, \ldots \frac{X_{t_n}}{X_{t_{n-1}}}$ are mutually independent.
2. Paths of $X_t$ are continuous as function of $t$, meaning they do not jump.
3. For $s > 0$, $\mathrm{log}(\frac{X_{t+s}}{X_t}) \sim \mathrm{N}((\mu - \frac{\sigma^2}{2})s, \sigma^2 s)$

So now lets try to do some modelling of stock prices as a geometric brownian motion.

Suppose $X_t \sim GBM(\mu, \sigma)$. Clearly
1. $X_t > 0 \Rightarrow X_{t+s} > 0$ for any $s > 0$
This tells us that the limited liability of stock price is not violated.
2. The distribution of $\frac{X_{t+s}}{X_t}$ only depends on s and not on $latex X_t. We will look at the Black-Scholes option formula next time and will come back to review the geometric brownian motion for the underlying model. ### Introduction to Brownian Motion Lets look at brownian motion now. And yes, its the same as what our high school teachers taught about the particles moving in random motion. Here, we attempt to give it a proper structure and definition to work with. A Brownian Motion is a random process $\{ X_t : t \ge 0 \}$ with parameters $(\mu, \sigma)$ if For $0 \textless t_1 \textless t_2 \textless \ldots \textless t_{n-1} \textless t_n$, $(X_{t_2} - X_{t_1}), (X_{t_3} - X_{t_2}), \ldots, (X_{t_n} - X_{t_{n-1}})$ are mutually independent. This is often called the independent increments property. For $s > 0, X_{t+s} - X_t \sim \mathrm{N} ( \mu s, \sigma^2 s)$ $X_t$ is a continuous function of t. We say that $X_t$ is a $\mathrm{B} (\mu, \sigma)$ Brownian motion with drift $\mu$ and volatility $\sigma$. For the special case of $\mu = 0$ and $\sigma = 1$, we have a standard Brownian motion. We can denote it with $W_t$ and assume that $W_0 = 0$ If $X_t \sim \mathrm{B}(\mu, \sigma)$ and $X_0 = x$ then $X_t = x + \mu t + \sigma W_t$ where $W_t$ is a standard brownian motion. Thus, $X_t \sim \mathrm{N}(x+\mu t, \sigma^2 t)$ The next concept is important in finance, that is, Information Filtrations. For any random process, we will use $\mathcal{F}_t$ to denote the information available at time t. – the set $\{\mathcal{F}_t\}_{t \ge 0}$ is then the information filtration. $\mathbb{E}[.|\mathcal{F}_t]$ denotes an expectation conditional on time t information available. Note: The independent increment property of Brownian Motion implies that any function of $W_{t+s} - W_t$ is independent of $\mathcal{F}_t$ and that $(W_{t+s}-W_t) \sim \mathrm{N}(0,s)$. So let us do a bit of math to obtain $\mathbb{E}_0[W_{t+s}W_s]$ for instance. Using condition expectation identity, we have $\mathbb{E}_0 [W_{t+s}W_s]$ $= \mathbb{E}_0 [(W_{t+s} - W_s + W_s)Ws]$ $= \mathbb{E}_0 [(W_{t+s}-W_s)W_s] + \mathbb{E}_0 [{W_s}^2]$ $= \mathbb{E}_0 [\mathbb{E}_s[(W_{t+s} - W_s)W_s]] + s$ $= \mathbb{E}_0 [W_s \mathbb{E}_s[(W_{t+s} - W_s)]] + s$ $= \mathbb{E}_0 [W_s 0] + s$ $= 0 + s$ $= s$ ### Review of Basic Probability So I understand that I lost many readers for the Sampling uploads.It is a bit difficult to the intensive use of notations and also the need for statistics knowledge. So here I’ll review a bit of basic probability. The contents here will be basic, and will involve some H2 Mathematics Statistics too. Discrete Random Variables Continuous Random Variables Conditional Expectations and Variances Multivariate Distributions Multivariate Normal Distribution The following three are in relation to Finance. Introduction to Martingales Introduction to Brownian Motion Geometric Brownian Motion Introduction to Stochastic Calculus ### Introduction to Martingales This is a rather important topics for anyone interested in doing Finance. Lets look at their definition first. A Martingale is a random process $\{X_n: 0 \le n \le \infty \}$ with respect to the information filtration $F_n$ and the probability distribution $P$, if$latex \mathbb{E}^P [|X_n|] < \infty$for all$latex n \ge 0latex \mathbb{E}^P[X_{n+m}|F_n] = X_n$for all$latex n, m \ge 0Martingales are used widely and one example is to model fair games, thus it has a rich history in modelling of gambling problems. If you google Martingale, you will get an image related to a Horse, because it started with Horse-betting. [caption id="attachment_2845" align="alignnone" width="300"] Martingales. Source: NYU[/caption] We define a submartigale by replacing the above condition 2 with $\mathbb{E}^P [X_{n+M}| F_n] \ge X_n$ for all $n, m \ge 0$ and a supermartingale with $\mathbb{E}^P [X_{n+M}| F_n] \le X_n$ for all $n, m \ge 0$ . Take note that a martingale is both a submartingale and a supermartingale. Submartingale in layman terms, refers to the player expecting more as time progresses, and vice versa for supermartingale. Let us try to construct a Martingale from a Random Walk now. Let $S_n := \sum_{i=1}^n X_i$ be a random walk where the $X_i$’s are IID with mean $\mu$. Let $M_n := S_n -n \mu$. Then $M_n$ is a martingale because: $\mathbb{E}_n [M_{n+m}]$ $= \mathbb{E}_n [\sum_{i=1}^{n+m} X_i - (n+m) \mu]$ $= \mathbb{E}_n [\sum_{i=1}^{n+m} X_i] - (n+m) \mu$ since expectation distributes linearly $= \sum_{i=1}^n X_i + \mathbb{E}_n [\sum_{i=n+1}^{n+m} X_i] - (n+m) \mu$ $= \sum_{i=1}^n X_i + m \mu - (n+m) \mu = M_n$ So how will a martingale betting strategy be like? Here, we let $X_1, X_2, \ldots$ be IID random variables with $P(X_i = 1) = P(X_i = -1) = \frac{1}{2}$. We can imagine $X_i$ to represent the result of a coin-flipping game where, – player win1 if the coin comes up heads, that is, $X_i = 1$
– player lose $1 if the coin comes up tails, that is, $X_i = -1$ Consider further now a doubling strategy where we keep doubling the bet until we eventually win. Once we win, we stop and our initial bet is$1.
The first thing we note is that the size of bet on the $n^{th}$ play is $2^{n-1}$ assuming we are still playing at time n. And we can let $W_n$ denote total winnings after n coin tosses, assuming $W_0 = 0$. Then $W_n$ is a martingale!

To see this, let us prove that $W_n \in \{ 1, -2^n +1 \}$ for all n.
Suppose we win for first time on $n^{th}$ bet. Then
$W_n = -(1 + 2 + \ldots + 2^{n-2}) + 2^{n-1}$
$= -(2^{n-1} - 1) + 2^{n-1} = 1$
If we have not yet won after n bets then,
$W_n = -(1 + 2 + \ldots + 2^{n-1}) = -2^n +1$
Finally, to show $W_n$ is a martingale, we just need to show $\mathbb{E}[W_{n+1} | W_n] = W_n$ which can be easily prove using iterated expectations.
For case 1, $W_n = 1$, then $P(W_{n+1} = 1 | W_n = 1) = 1$ so $\mathbb{E}[W_{n+1} | W_n = 1] = 1 = W_n$
For case 2, $W_n = -2^n +1$, meaning we bet $2^n$ on $(n+1)^{th}$ toss so $W_{n+1} \in \{ 1 , -2^{n+1} + 1 \}$. Since
$P(W_{n+1} = 1) | W_n = -2^n +1) = \frac{1}{2}$, and
$P(W_{n+1} = -2^{n+1}+1 | W_n = -2^n +1) = \frac{1}{2}$,
then
$\mathbb{E}[W_{n+1} | W_n = -2^n +1] = \frac{1}{2} \times 1 + \frac{1}{2} \times (-2^{n+1} +1) = -2^n + 1 = W_n$
Thus, we showed that $\mathbb{E} [W_{n+1} | W_n] = W_n$

To bring what we learnt a further step, lets look at Polya’s Urn briefly.
Consider an urn which contains red balls and green balls. Initially there is just one green ball and one red ball in the urn.
At each time step, a ball is chosen randomly from the urn:
If ball is red, the its returned to the urn with an additional red ball.
If ball is green, then its returned to the urn with an additional green ball.
Let $X_n$ denote the number of red balls in the urn after n draws. Then
$P(X_{n+1} = k+1 | X_n = k) = \frac{k}{n + 2}$
$P(X_{n+1} = k | X_n = k) = \frac{n + 2 - k}{n + 2}$
We can show that $M_n := \frac{X_n}{n+2}$ is a martingale.