MSW, or Mean Square Within, is a statistical measure used in the context of the F distribution and the F ratio. It represents the average of the squared deviations of the observations within each group from their respective group means, providing a measure of the variability within the groups being compared.