Q:

stochastic vs. deterministic trend in time series

I am relatively new to time series and studying this section - https://otexts.com/fpp3/stochastic-and-deterministic-trends.html. 
From the above section, didn't quite understand the difference why one is called stochastic and the other is called deterministic. Went through several posts in stack overflow. But I don't see a relation to the answer in below posts to the above textbook. Can some one please explain this. 
What is the difference between deterministic and stochastic model?
Explain what is meant by a deterministic and stochastic trend in relation to the following time series process? 
I saw the youtube videos in the second link, and I understood the difference between deterministic and stochastic. But, I don't see any relation between the explanation in video vs. text books ( which talks about ARIMA process with D=1)  

A:

Deterministic Trend
$$
y_t = \beta_0 + \beta_1 t + \epsilon_t
$$
where $\{\epsilon_t\}$ is white noise, for simplicity. Same discussion applies to the case where $\{\epsilon_t\}$ is a covariance-stationary process  (e.g. ARIMA with $d = 0$).
The process is random fluctuations around a deterministic linear trend $\beta_0 + \beta_1 t$. Hence the terminology "deterministic trend".
Such processes also called trend-stationary. If you remove the linear trend, you recover the stationary process $\{\epsilon_t\}$.
Stochastic Trend
$$
y_t = \beta_0 + \beta_1 t + \eta_t
$$
where $\{\eta_t\}$ is a random walk, for simplicity. Same discussion applies to the case where $\{\eta_t\}$ is an $I(1)$ process (e.g. ARIMA with $d = 1$).
Equivalently,
$$
y_t = y_0 + \beta_0 + \beta_1 t + \sum_{s = 1}^{t} \epsilon_t 
$$
where $\{\epsilon_t\}$ is the white noise driving the random walk $\{\eta_t\}$.
The "stochastic trend" terminology refers to $\eta_t$. The random walk is a highly persistent process, giving its sample path the appearance of a "trend".
Such processes are also called difference-stationary. If you take first-difference, you recover the stationary process $\{\epsilon_t\}$, i.e.
$$
\Delta y_t = \beta_1 + \epsilon_t,
$$
which is the same series (random walk with drift) from your second link.
Visual Similarity
You can observe via simulation that the sample paths from these two models can be visually similar---e.g. choose $\beta_1=1$ and $\epsilon_t \stackrel{i.i.d.}{\sim}(0,1)$.
This is because the linear trend $\beta_0 + \beta_1 t$ dominates. More precisely, for both models
$$
\frac{y_t}{t} = \beta_1 + o_p(1).
$$
Only the slope term $\beta_1$ is not negligible in the limit. For the deterministic trend case, it is clear that $\frac{\epsilon_t}{t} = o_p(1)$.
For the stochastic trend case, $\frac{\eta_t}{t} = o_p(1)$ because $\frac{\eta_t}{\sqrt{t}}$ converges in distribution to a normal distribution (Central Limit Theorem).
Statistical Testing
The visual similarity of sample paths motivates the problem of statistically distinguishing these two models. This is the purpose of unit root tests---e.g. the (Augmented) Dickey-Fuller test, which is historically the first such test.
For the ADF test, you basically take the detrended series $\tilde{y}_t$ (residuals from regressing $y_t$ on $1$ and $t$), run the regression
$$
\Delta \tilde{y}_t = \alpha \tilde{y}_{t-1} + \tilde{\epsilon}_t,
$$
and consider the $t$-statistic for $\alpha = 0$. It the $t$-statistic is small, you reject the null of stochastic trend.
The empirical reasoning behind the ADF test is simple. Even though the sample paths themselves are similar, the detrended series would look quite different. Under trend-stationarity, the detrended series would appear stationary. On the other hand, if a difference-stationary model is mistakenly detrended, the detrended series would not appear stationary.

