The F distribution is derived from the ratio of two independent chi-squared variables, specifically when X1 follows a chi-squared distribution with n1 degrees of freedom and X2 with n2 degrees of freedom. The relationship is expressed as (X1/n1) / (X2/n2) following an F distribution with parameters n1 and n2. The moment-generating function (mgf) can be utilized to find the raw moments of the F distribution. Additionally, the mean and variance can be calculated, with the mean being n2 / (n2 - 2) for n2 > 2, and the variance being [2n2^2(n1 + n2 - 2)] / [n1(n2 - 2)^2(n2 - 4)] for n2 > 4. This derivation and properties are crucial for statistical analysis involving the F distribution.