Generalized random walk process: Fokker-Planck equation The diffusion equation
$$
\frac{\partial p(x,t)}{\partial t} = D \frac{\partial^2 p(x,t)}{\partial x^2}
$$
can be derived from a simple random walk on a line.
For example, if the probability of particle being on $i^{th}$ site at a timestep $n$ is given by $P(i,n)$, then it can be given as,
$$
P(i,n) = \frac{1}{2}\left[ P(i-1,n-1) + P(i+1,n-1) \right]
$$
subtracting $P(i,n-1)$ on both the sides and going to the continuum limit ($i \rightarrow x; n \rightarrow t$) one can arrive at the diffusion equation given at the top.
There are two assumptions built into this random walk.

*

*Only the position at timestep ($n$) depends only on position at timestep ($n-1$) - Markovian nature.

*Jumps only one step is allowed (i.e. particle can jump only from $i+1$ or $i-1$ to $i$, jumps of two or higher steps are not allowed) - Is this associated to Gaussian approximation?

Now how will the differential equation be modified if I don't consider the above mentioned assumptions? Essentially, can we use this kind of a random walk model to arrive at a non-Markovian and non-Gaussian diffusion equation (A generalized Fokker-Planck equation)?
 A: There is no general equation that could describe all the possible types of random walks. The two assumptions mentioned severely limit the number of possibilities, which is how one arrives at such a simple equation.
Markovian assumption means that the value of the process at step $n$ depends only on its value on step $n-1$. In principle, it could depend on the value at other steps, e.g.,
$$
P(i,n)=\sum_{m=0}^{n-1}\sum_jW_{i,n; j,m}P(j,m)
$$
In the above equation I also eased the Locality assumption - that the only the jumps between neighboring values are allowed.
Finally, there are also homogeneuity assumptions in space and time - that is that the probability of jump is independent on the initial and final states ($j$ and $i$) and that it is independent on the times $n$ and $m$.
The general equation above contains only linearity assumption. Assuming that the time and space steps are small one could reduce it to a differential equation, which can have infinitely high order in time and space derivatives, but such a general equation is of little use.
Digression:
In machine learning one often talks about the interplay between bias and variance. Bias results from using a specific model, as not all data points will fit it well. Variance describes how broadly the data points are distributed about the model predictions. Too big a variance means that our model is too simplistic and cannot fit the data (under-fitting), whereas too small variance means that the model potentially has too many parameters (overfitting). In this view, the principles of physics serve to introduce some bias in the model - i.e., to come up with models that are sufficiently simple to fit the data with few parameters, yet sufficiently complex to produce useful predictions.
In the question above one starts with a huge number of parameters $W_{i,n;j,m}$. Assuming homogenuity in time and space, and locality in time in space (locality in time is the Markovian assumption) one reduces it to the diffusion equation with one parameter, the diffusion coefficient $D$. In some cases this model may prove too simplistic, and one might wish to relax some of the assumptions to allow for more parameters - this is the essence of physics. Starting with as many parameters as possible, and gradually reducing their number, till the results eventually become meaningful, is machine learning.
A: From probability transition to PDEs: diffusion equation
Basically, you can interpret the probability interpretation as a discret(ized) form of continuum equations.
For the diffusion equation, you start from the probability transition
$P(i,n) = \dfrac{1}{2} P(i-1,n-1) + \dfrac{1}{2} P(i+1,n-1)$,
since, for every point in space (and thus, any index $i$) and any time (and thus, any index $n$), you imagine that there is equal probability to be at $i$ at time $n$ coming from $i-1$ or $i+1$ at time $n-1$.
Subtracting $P(i,n-1)$ on both sides of the equation, you get
$P(i,n) - P(i,n-1) = \dfrac{1}{2} P(i-1,n-1) - P(i,n-1) + \dfrac{1}{2} P(i+1,n-1)$.
Dividing by $\Delta t$, the interval of time between two discrete time interval, and defining $D = \frac{\Delta x^2}{2 \Delta t}$, we get
$\dfrac{P(i,n) - P(i,n-1)}{\Delta t} = D \dfrac{P(i-1,n-1) - 2 P(i,n-1) + P(i+1,n-1)}{\Delta x^2}$,
i.e. the discrete version of the diffusion equation using time-explicit Euler scheme for the first order time derivative and centered scheme for the second order space derivative.
From probability transition to PDEs: general equation
If you add "extra terms" in the probability transition relation:
$P(n,i) = \displaystyle \sum_m \sum_j p_{n,i;m,j} P(i-j,n-m)$,
where the sum of $p_{n,i;m,j}$ is equal to $1$, you get different form of the discret(ized) equation, in the form of difference equation. It this equation, you can recognize the discrete version of differential operations and get a differential equation.
