Given :
\[
\begin{array}{ccc}
\text{Student} & \text{Study Hours (X)} & \text{Test Score (Y)} \\
1 & 2 & 40 \\
2 & 4 & 50 \\
3 & 6 & 60 \\
4 & 8 & 70 \\
5 & 10 & 80 \\
\end{array}
\]
There are two formulas for covariance depending on the context:
1. Population covariance:
$$
\operatorname{Cov}(X, Y)=\frac{\sum\left(X_i-\tilde{X}\right)\left(Y_i-\tilde{Y}\right)}{n}
$$
2. Sample covariance:
$$
\operatorname{Cov}(X, Y)=\frac{\sum\left(X_i-\bar{X}\right)\left(Y_i-\bar{Y}\right)}{n-1}
$$
Since we are dealing with a sample of 5 students (not the entire population), we should divide by $n-1=4$.
Step 1: Calculate means
$$
\begin{aligned}
& \bar{X}=(2+4+6+8+10) / 5=30 / 5=6 \\
& \bar{Y}=(40+50+60+70+80) / 5=300 / 5=60
\end{aligned}
$$
Step 2: Compute $(\mathrm{Xi}-\overline{\mathrm{X}})$ and $(\mathrm{Yi}-\overline{\mathrm{Y}})$
\[
\begin{array}{ccccc}
X & Y & X_i - \overline{X} & Y_i - \overline{Y} & (X_i - \overline{X})(Y_i - \overline{Y}) \\
2 & 40 & -4 & -20 & 80 \\
4 & 50 & -2 & -10 & 20 \\
6 & 60 & 0 & 0 & 0 \\
8 & 70 & 2 & 10 & 20 \\
10 & 80 & 4 & 20 & 80 \\
\end{array}
\]
Step 3: Sum of products
\begin{aligned}
&\Sigma[(X i-\bar{X})(Y i-\bar{Y})]=80+20+0+20+80=200\\
&\operatorname{Cov}(X, Y)=\frac{200}{4}=50
\end{aligned}