An alternative solution with tabularray
package:
\documentclass{article}
\usepackage{caption}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\setlength{\heavyrulewidth}{1.5pt}
\begin{document}
\begin{table}[!htbp]
\centering
\caption{Comparison of percentages.}
\begin{tblr}{
colspec = {crrrr},
cell{1}{2,4} = {c=2}{c}, % multicolumn (column number=2, center alignment)
}
\hline[2pt]
Mode & Var & & Cum & \\
\hline[1pt]
& EF & CHF & EF2 & CHF2 \\
\cline{2-5}
1 & 17.5 & 19.1 & 17.5 & 19.1 \\
2 & 11.8 & 12.7 & 29.3 & 31.9 \\
3 & 6.6 & 5.6 & 35.9 & 37.4 \\
\hline[2pt]
\end{tblr}
\end{table}
\begin{table}[!htbp]
\centering
\caption{Comparison of percentages.}
\begin{booktabs}{
colspec = {crrrr},
cell{1}{2,4} = {c=2}{c}, % multicolumn (column number=2, center alignment)
}
\toprule
Mode & Var & & Cum & \\
\midrule
& EF & CHF & EF2 & CHF2 \\
\cmidrule[lr]{2-3}\cmidrule[lr]{4-5}
1 & 17.5 & 19.1 & 17.5 & 19.1 \\
2 & 11.8 & 12.7 & 29.3 & 31.9 \\
3 & 6.6 & 5.6 & 35.9 & 37.4 \\
\bottomrule
\end{booktabs}
\end{table}
\end{document}