Why wasn't n-1 used in the denominator for this sample calculation?

I know that n-1 should be used when using sample data, but how do we know when to use n-1 or n because it seems to vary

For example, question asks to calculate the mean absolute deviation for a sample

I calculated it using n-1 in the denominator because it was using sample data and it should’ve been just n.

For calculating MAD, is n-1 never used even for sample data?

You use n – 1 for calculating sample variances (and, thus, standard deviations); you use n for calculating sample means.

I’ve never heard of using n – 1 for calculating sample MADs, but I think that you should, for the same reason as for calculating sample standard deviations. Apparently the world doesn’t agree with me. It ain’t the first time.

Ok so only calculations for variances or standard deviations should use n-1 if based on sample data

MAD should too, but I will just remember to calculate this using n

For MAD you should use n. For other calculations you can use n-1 .

The question wasn’t whether; the question was _ why _.