I am having so much trouble in making a table.
I know that \thread about the split the content in a cell into 2 row. But not successful.
Basically, I want to draw a table like this below:
The output of mine:
I am using
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}Xllrr}
My Full MWE:
\documentclass[12pt,oneside]{book}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{makecell, multirow, tabularx}
\renewcommand\theadfont{\small\bfseries} % for bold in table using \small
\renewcommand\theadgape{}
\usepackage[svgnames, table]{xcolor}
\usepackage{hhline, boldline}
\usepackage{seqsplit, caption} %for table spacing to second row
\usepackage{booktabs, ragged2e} % Use booktabs rules and get rid of vertical rules, ragged2e to ragged text
\usepackage{siunitx} %for table spacing to second row
\usepackage{threeparttable} %to add footnote below table
\usepackage{tabulary}
\usepackage{graphicx}
\begin{document}
\begin{table}[h!]
\centering
\begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}Xllrr}
% \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}Xrrrrrr}
\toprule
& & & \multicolumn{2}{c}{\textbf{Cholestrrol Levellll}} \\
\cmidrule{4-5}
& & & \thead{{\textbf{Equal}} \\ \textbf{variances} \\ \textbf{assumed}}
& \thead{{\textbf{Equal}} \\ \textbf{variances not} \\ \textbf{assumed}}\\
\midrule
\multicolumn{1}{l}{Levene's Test for Equality of Variances} & F
& & 0.314 & \\
& Sig. & & 0.579 & \\
\midrule
\multicolumn{1}{l}{t-test for Equality of Means} & t
& & 2.428 & 2.428 \\
& df & & 38 & 34.886 \\
& Sig. (2-tailed) & & 0.579 & 0.64273\\
& 95\% Confidence & Lower & 0.579 & 0.64273\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}



\multicolumn{1}{l}{...in the leftmost column (which is ofXtype). Things look much better if you replace them by\multicolumn{1}{X}{..., or just use no\multicolumnthere at all. – Nov 10 '19 at 01:08