Let us say i have salary information of 100 male employees and 100 female employees. I compute the averages and the average male salary is higher than the average female salary. Based on this, can we say that males earn more than females?

Or do i need to form a null and alternative hypothesis and carry out hypothesis testing?