How do we represent frequency distribution below in Mathematica?

I can find the mean, median and mode manually. Just curious to know how can I represent the frequency distribution using Mathematica and from it determine the mean, median and mode.
The values that I determined manually using the respective formulas are mean = 35.8867, median = 33.9444, mode = 28.1364
I tried to approach it in Mathematica 12.1 by using probability distribution:
pdf[x_] := Piecewise[{{20, 19.5 <= x < 24.5},
{24, 24.5 <= x < 29.5},
{45, 29.5 <= x < 39.5},
{30, 39.5 <= x < 54.5},
{5, 54.5 <= x < 59.5},
{4, 59.5 <= x < 69.5}}, 0]
dist = ProbabilityDistribution[pdf[x], {x, 19.5, 69.5}, Method -> "Normalize"];
Mean[dist]
Median[dist]
The results that I obtained is mean = 38.9198, median = 37.7738, which are incorrect, and so is my approach.
Anyone can help?