# GBM probability of hitting barrier

I tried using the brownian bridge approach to determine the probability $$P(S_t<\beta,t\in [0,T]|S_0,S_T)$$ where $S_t$ is a GBM in the usual Black Scholes setup. We know that for a BM $W_t$, $$P(W_t<\beta,t\in [0,T]|W_T=x)=1-\exp\bigg(-\frac{2}{T}\beta(\beta-x)\bigg)$$ and I then tried the following: since $$S_t=S_0e^{(\mu-1/2\sigma^2)t-\sigma W_t}$$we have \begin{aligned}&P(S_t<\beta,t\in [0,T]|S_0,S_T=s)\\&=P\bigg(W_t<\frac{\ln(\beta/S_0)-(\mu-1/2\sigma^2)t}{\sigma}\bigg|S_0,W_T=\frac{\ln(s/S_0)-(\mu-1/2\sigma^2)T}{\sigma}\bigg)\\&=1-\exp\bigg(-\frac{2}{T}\bigg(\frac{\ln(\beta/S_0)-(\mu-1/2\sigma^2)t}{\sigma}\bigg)\bigg(\frac{\ln(\beta/S_0)-\ln(s/S_0)}{\sigma}\bigg)\bigg)\\&=1-\exp\bigg(-\frac{2}{\sigma^2T}\bigg(\ln(\beta/S_0)-(\mu-1/2\sigma^2)t\bigg)\ln(\beta/s)\bigg)\end{aligned} Evidently, the correct answer is just$$1-\exp\bigg(-\frac{2}{\sigma^2T}\ln(\beta/S_0)\ln(\beta/s)\bigg)$$ so I believe I'm almost there. What am I missing?

In Inequality \begin{align*} W_t<\frac{\ln(\beta/S_0)-(\mu-1/2\sigma^2)t}{\sigma}, \end{align*} the right-hand side depends on $t$, you are not able to use the above result directly. In this case, a Girsanov transformation is usually employed.
Let $a= \frac{\mu-1/2\sigma^2}{\sigma}$, $b= \frac{\ln(\beta/S_0)}{\sigma}$, and $c= \frac{\ln(s/S_0)}{\sigma}$. We define the probability measure $\tilde{P}$ such that \begin{align*} \frac{d\tilde{P}}{dP}\big|_t = e^{-\frac{1}{2}a^2 t - aW_t}, \end{align*} where $P$ is the original probability measure. Then $\tilde{W}_t = W_t + at$ is a standard Brownian motion under $\tilde{P}$. Let $E$ and $\tilde{E}$ be expectations with respect to measures $P$ and $\tilde{P}$. Then, for any Borel set $A$, \begin{align*} &\ E\left(\pmb{1}_{\{W_t+at < b, t \in [0, T]\}} \pmb{1}_{\{W_T\in A\}} \right)\\ =&\ \tilde{E}\left(\left(\frac{d\tilde{P}}{dP}\big|_T \right)^{-1}\pmb{1}_{\{W_t+at < b, t \in [0, T]\}} \pmb{1}_{\{W_T\in A\}} \right)\\ =&\ \tilde{E}\left(e^{\frac{1}{2}a^2 T + aW_T}\pmb{1}_{\{W_t+at < b, t \in [0, T]\}} \pmb{1}_{\{W_T\in A\}} \right)\\ =&\ \tilde{E}\left(e^{-\frac{1}{2}a^2 T + a\tilde{W}_T}\pmb{1}_{\{\tilde{W}_t < b, t \in [0, T]\}} \pmb{1}_{\{\tilde{W}_T-aT\in A\}} \right)\\ =&\ \tilde{E}\left(e^{-\frac{1}{2}a^2 T + a\tilde{W}_T}\pmb{1}_{\{\tilde{W}_T-aT\in A\}}\tilde{E}\left(\pmb{1}_{\{\tilde{W}_t < b, t \in [0, T]\}} \,|\, \tilde{W}_T \right) \right)\\ =&\ \tilde{E}\left(e^{-\frac{1}{2}a^2 T + a\tilde{W}_T}\pmb{1}_{\{\tilde{W}_T-aT\in A\}}\left[1-\exp\Big(-\frac{2}{T}b(b-\tilde{W}_T)\Big) \right] \right)\\ =&\ E\left(\frac{d\tilde{P}}{dP}\big|_Te^{-\frac{1}{2}a^2 T + a\tilde{W}_T}\pmb{1}_{\{\tilde{W}_T-aT\in A\}}\left[1-\exp\Big(-\frac{2}{T}b(b-\tilde{W}_T)\Big) \right] \right)\\ =&\ E\left(\pmb{1}_{\{W_T\in A\}}\left[1-\exp\Big(-\frac{2}{T}b(b-W_T-aT)\Big) \right] \right). \end{align*} That is, \begin{align*} E\left(\pmb{1}_{\{W_t+at < b, t \in [0, T]\}} \,|\, W_T\right)&=1-\exp\Big(-\frac{2}{T}b(b-W_T-aT)\Big), \end{align*} or, equivalently, \begin{align*} E\left(\pmb{1}_{\{W_t+at < b, t \in [0, T]\}} \,|\, W_T=x\right)&=1-\exp\Big(-\frac{2}{T}b(b-x-aT)\Big). \end{align*} Therefore, \begin{align*} &\ P\bigg(W_t<\frac{\ln(\beta/S_0)-(\mu-1/2\sigma^2)t}{\sigma}, t \in[0, T]\,\Big|\,S_0,W_T=\frac{\ln(s/S_0)-(\mu-1/2\sigma^2)T}{\sigma}\bigg)\\ =&\ E\left(\pmb{1}_{\{W_t+at < b, t \in [0, T]\}} \,|\, W_T=c-aT\right)\\ =&\ 1-\exp\Big(-\frac{2}{T}b(b-c)\Big)\\ =&\ 1-\exp\Big(-\frac{2}{\sigma^2T}\ln(\beta/S_0)\ln(\beta/s)\Big). \end{align*}