when we write a formula of a compound in its simplest form, it is empirical formula.
Given the molecular formula is = C₁₈H₃₆
Now we can relate both empirical and molecular formula as;
Molecular formula = n x empirical formula
C₁₈H₃₆ = 18 x CH₂
So the empirical formula of C₁₈H₃₆ is CH₂