Introduction to Stochastic Calculus
jiha-kim.github.io
jiha-kim.github.io
And this inspiring textbook I think has high overlap with these topics: https://www.amazon.com/Stochastic-Integration-Differential-E...
Calculus (without proofs) Linear Algebra Real Analysis (proofs of calculus) Measure Theory
There are also higher level courses that are worth taking, because they motivated a lot of this theory. They would be imo, Functional Analysis (real analysis applied to spaces of functions), and Partial Differential Equations.
If you've knocked off some of the undergrad prereqs and feel good about proofs, this could be the right book for you: https://www.amazon.com/Probability-Martingales-Cambridge-Mat.... Another gem of a book.
But often no, you need to run a stochastic algorithm (e.g. Gillespie's algorithm in the case of simple stochastic chemical kinetics) as there will be no analytical solution.
Again it has been a while though.
I question why this is the second highest article on hacker news currently, can’t imagine many people reading this website are REALLY in this field or a related one, or if it’s just signaling like saying you have a copy of Knuths books or that famous lisp one
I also upvote because I find it interesting to learn about stuff I didn't know about. I might not understand it, but I do like the exposure regardless.
What one often wishes to have is the expectation of a function of a stochastic process at some point, and what can be shown is that this expectation obeys a certain (deterministic) partial differential equation. This then can be solved using numerical PDE solvers.
In higher dimensions, though, or if the process is highly path-dependent (not Markovian), one resorts to Monte Carlo simulation, which does indeed simulate "many possible unfolding of events".
Edit: sometimes people are interested in other types of questions, for example the solution when certain random events occur. Analogous comments apply. Also, while stochastic calculus is very useful for working with SDEs, if your interest is other types of Markov (or even non-Markov) processes you may need other tools.
Edit again: as another commenter mentioned, in special cases the SDE itself may also have exact solutions, but in general not.
[0] This statement is specific to stochastic differential equations, i.e., a differential equation with (gaussian) white noise forcing. For other types of stochastic processes, e.g., Markov jump processes, the evolution equation for distributions have a different form (but some general principles apply to both, e.g., forms of the Chapman-Kolmogorov equation, etc).
- Usually, you will only get analytic answers for simple questions about simple distributions.
- For more complicated problems (either because the question is complicated, or the distribution is complicated, or both), you will need to use numerical methods.
- This doesn't necessarily mean you'll need to do many simulations, as in a Monte Carlo method, although that can be a very reasonable (albeit expensive) approach.
More direct questions about certain probabilities can be answered without using a Monte Carlo method. The Fokker-Planck equation is a partial differential equation which can be solved using a variety of non-Monte Carlo approaches. The quasipotential and committor functions are interesting objects which come up in the simulation of rare events that can also be computed "directly" (i.e., without using a Monte Carlo approach). The crux of the problem is that applying standard numerical methods to the computation of these objects faces the curse of dimensionality. Finding good ways to compute these things in the high-dimensional case (or even the infinite-dimensional case) is a very hot area of research in applied mathematics. Personally, I think unless you have a very clear physical application where the mathematics map cleanly onto what you're doing, all this stuff is probably a bit of a waste of time...
Oddly, most mentions of Langevin Dynamics in relation to AI that I've seen omit the use of momentum, even though gradient descent with momentum is widely used in AI. To confuse matters further, "stochastic" is used to refer to approximating the gradient using a sub-sample of the data at each step. You can apply both forms of stochasticity at once if you want to!
Eugene Wong,
{\it Stochastic Processes in Information and
Dynamical Systems,\/}
McGraw-Hill,
New York,
1971.\ \And I remember noting that the standard deviation in regular statistics was that “quadratic variation” was slightly different than how variance is calculated. Off by one or squared or whatever. I made a note to eventually investigate why. Probably due to some stochastic volatility.
sum i=1..N (x_i - mu)^2 / N
while, given a sample of n iid [1] samples from a distribution, the best [2] estimate of the distribution variance is sum i=1..n (x_i - a )^2 / (n-1)
Note that we replaced the mean mu by the sample average a, [3] and divided by (n-1) instead of N.[0] with the mean mu := sum x_i / N being the actual mean of the population
[1] independent and identically distributed
[2] best in the sense of being unbiased. It's a tedious, but not very difficult calculation to confirm that the expectation of that second expression (with n-1) is the population variance.
[3] with the sample average a := sum x_i / n being an estimate of the population mean
To me there are two ways to approach the problem I think you are thinking of (sample variance I think).
(1) The sample variance depends on the sample mean which is sum(x_i) / n. Given the first n-1 of n samples, you would then know the final value (x_n = n * sample_mean - sum(x_i)_(n-1)) so at the very least n-1 could be understood as a "degrees of freedom". There are only n-1 degrees of freedom. Other higher sample moments can be roughly understood with the same degrees of freedom argument. This could be wrong though, it was just something I remember from somewhere.
(2) The more mathematically inclined way is that biased_sample_variance = sum((x_i - sum(x_i) / n)^2) / n. The mean of the biased_sample_variance (across many iterations of a set of samples N), is not the population variance, but (n - 1) / n * population_variance (i.e. it is biased). So you multiply the biased_sample_variance by (n / (n - 1)) which gives the unbiased sample_variance equation: sum((x_i - sum(x_i) / n)^2) / (n - 1). The math is rather fun in my opinion, once you get into the swing of things.
I sure do hope I understood your question correctly.
Let’s say we play a “game”. Draw a random number A between 0 and 1 (uniform distribution). Now draw a second number B from the same distribution. If A > B, draw B again (A remains). What is the average number of draws required? (In other words, what is the average “win streak” for A?)
The answer is infinity. The reason is, some portion of the time A will be extremely high and take millions of draws to beat.
If p is the value drawn for A, then each time B is drawn, the probability that B>A is (1-p), So, the chance that B is drawn n times before being less than or equal to A is, p^(n-1) (1-p) (a geometric distribution). The expected number of draws is then (1/p) . Then, E[draws] = E[E[draws|A=p]] = \int_0^1 E[draws|A=p] dp = \int_0^1 (1/p) dp, which diverges to infinity (as you said).
(I wasn’t doubting you, I just wanted to see the calculation.)
Would stochastic calculus be a useful approach in actuarial prediction of life expectancies of mice?
(And this is why I am pleased to see this high on HN.)
eg https://www.soa.org/globalassets/assets/Files/static-pages/r...
Because you have as many questions (loci) as you have segments that you can reasonably expect to divide time into (changing the time of death by 1/50th of a mouse lifespan would be impossible to detect unless I am wrong?), and because the time intervals are not that numerous, and also because you wouldn't really have a model for the interaction of the state variables and would be using model-free statistical methods, I think you would get all of the value there is to get out of noncontinuous methods.
I think stochastic calculus looks at a system whose output value is a smooth/real value. Basically, it is for modeling systems like random walks where there is a little bit of random up-and-down jumping in each interval. However, if you are basically looking time versus dead-or-alive, your output is binary and time-of-death is really all the info you get and you wouldn't need/want a random walk model, just a more ordinary statistical model. Maybe if there was some other variable besides dead-or-alive you were measuring or aware of a stochastic model could help then (which is a bit like saying "if we had bacon, we could have bacon-and-eggs, if we had eggs").
Also, if what you're saying is you have 50*X bytes of information that all influence life expectancy, it sounds like a challenging problem. But also it's kind of Taylor-made for neural networks; many discreet inputs versus a single smooth output. You might try a neural network and linear model and see how much better the neural network is - then you could determine if more complex-than-linear interactions were occurring.
In more practical terms, if I were to approach this problem, I'd discretize it in time and apply classical ml to predict "chance to die during month X assuming you survived that long" and fit it to data - that'd be much easier to spot errors and potential issues with your data.
I'd go for the stochastic calculus or actual survival analysis only if you wanted to prove/draw a connection between some pre-existing mathematical properly such as memory-less-ness and a physical/biological properly of a system such as behavior of certain proteins (that'd be insanely cool, but rather hard, esp if data is limited). In my (very vague) understanding, that's what finance papers that use stochastic analysis do - they make a mathematical assumption about some universal mathematical properly of a system (if markets were always near optimal with probability of deviation decaying as XYZ, the world economy would react this way to these things), and then prove that it actually fits the data.
Happy to chat more, sounds like a fun project :)
It's been a number of years since I've looked at these things, but https://www.theactuary.com/2024/04/04/bayesian-revolution and https://arxiv.org/abs/2310.14888 are recent articles that may be relevant.
For example, your DNA loci of interest could have a state (methylated or unmethylated). And you could come up with a stochastic process where death occurs when a function of methylation changes at those loci (e.g. a linear model) crosses a threshold (first passage in stochastic process jargon).
Omer Karin & Uri Alon have published a similar concept to explain how the decreased capacity of immune cells to remove senescent cells leads to a Gompertz-like law of longevity, something that originates from actuarial studies! Their model is simpler as they deal with a univariate problem [1].
https://en.wikipedia.org/wiki/Lasso_(statistics)
Since these are ages, I wouldn't assume an underlying Gaussian distribution. Making that change isn't as hard as you think.
https://en.wikipedia.org/wiki/Generalized_linear_model
As Always: Consult your friendly neighborhood statistician
That said, here are some folks trying to use SDEs to model cells, they even have a "dW" on their logo. This is a long way from predicting age of death, but it might eventually give insights into the exact mechanism. Also I think they're starting with bacteria and yeast, so mice might be a way off.
1. The only random process we understand initially is Brownian motion.
2. Luckily, we can change coordinates.
I sort of disagree with (1), since Ito's lemma is most naturally applied to ~martingales, of which Brownian Motion is an important special case.
> Brownian motion and Itô calculare a notable example of fairly high-level mathematics that are applied to model the real world
What is “Itô calculare” supposed to have been? I am stumped. “Its calculation”?
-> and Itô calculus are a notable
That said, already at masters level internships you could get asked much harder questions than what this article touches on. I got asked to prove the Cameron-Martin theorem once, I found that to be extremely difficult in a job interview setting.
In a linear rates shop (i.e. not trading options), almost all of the effort goes to tuning the deterministic bit of this equation. Thousands upon thousands of lines of code to do a problem that most books don't even mention behind giving the term a symbolic name!
And then if you do trade an option it's probably good enough to use an off the shelf model to work out your delta and so on.
If you're making markets or flogging exotics and structured products then you may indeed be wrangling this stuff all the time.
In finance, for instance, it leads to the concept of a "volatility tax." Naively, you might think that adding noise to the process shouldn't change the expected return, it would just add some noise to the overall return. But in fact adding volatility to the process has the effect of reducing the expected return compared to what you would have in the absence of volatility. (This is one of the applications of the result that the original article talks about in the Geometric Brownian Motion section.)
So the idea is “smooth curves do X, but non-smooth noisy curves do Υ(χ) where χ in some sense is the noise input into the system, and they aren't contradictory because Y(0) = X. (At least usually... I think chaos theory has some counterexamples where like the time t that you can predict a system’s results for, is, in the presence of exactly 0 noise, t=∞, but in the limit of nonzero noise going to zero, it's some finite t=T.)
who knew brownian motion would eventually help create cat memes?