Presentation on theme: "Statistical Techniques I EXST7005 The F distribution."— Presentation transcript:
Statistical Techniques I EXST7005 The F distribution
The F test n This test can be used to either, è test the equality of population variances - our present topic è test the equality of population means (this will be discussed later under ANOVA) n The F test is the ratio of two variances (the ratio of two chi square distributions) è Given two populations – Population 1Population 2 – Mean 1 2 – Variance 1 2
The F test (continued) n Two populations è Draw a sample from each population – Population 1Population 2 – Sample size n1 n2 d.f. 1 2 – Sample mean Y1 Y2 – Sample variance S1 S2
The F test (continued) n To test the Hypothesis H0: 12 = 22 H1: 12 22 (one sided also possible) use F = 12 / 22 è which has an expected value of 1 under the null hypothesis, but in practice there will be some variability so we need to define some reasonable limits and this will require another statistical distribution.
The F distribution 1) The F distribution is another family of distributions, each specified by a PAIR of degrees of freedom, 1 and 2. 1 is the d. f. for the numerator 1 is the d. f. for the denominator è Note: the two samples do not have to be of the same size and usually are not of the same size. 2) The F distribution is an asymmetrical distribution with values ranging from 0 to , so [0 F ].
The F distribution (continued) n 3) There is a different F distribution for every possible pair of degrees of freedom. 4) In general, an F value with 1 and 2 d.f. is not the same as an F value with 2 and 1 d.f., so order is important. i.e. F 1, 2 F 2, 1 usually n 5) The expected value of any F distribution is 1 if the null hypothesis is true.
F distribution with 1, 5 d.f. F distribution with 5, 10 d.f. F distribution with 100, 100 d.f. The F distribution n
The F tables 1) The numerator d.f. ( 1) are given along the top of the page, and the denominator d.f. ( 2) are given along the left side of the page. Some tables give only one F value at each intersection of 1 and 2. The whole page would be for a single value and usually several pages would be given.
The F tables (continued) Our tables will give four values at the intersection of each 1 and 2, each for a different value. These values are given in the second column from the left. n Our tables will have two pages. n Only a very few probabilities will be available, usually 0.05, 0.025, 0.01 and 0.005, and sometimes n Only the upper tail of the distribution is given.
d.f.P>F Partial F table
Working with F tables n The F tables are used in a fashion similar to other statistical tables. è For the two degrees of freedom (be sure to keep numerator and denominator degrees of freedom distinct). è For a selected probability value è Find the corresponding F value.
Using the F tables n EXAMPLE of F table use, one tailed example: Find F with (5,10) d.f. for = 0.05 find F0.05 such that P[F F0.05, 5, 10 d.f. ] = where 1 = 5 and 2 = 10
Using the F tables (continued) n For F5, 10 d.f. The tabular values are listed as 3.33, 4.24, 5.64, 6.87 n These represent P[F5, 10 d.f. 2.52] = (Not in your table) P[F5, 10 d.f. 3.33] = P[F5, 10 d.f. 4.24] = P[F5, 10 d.f. 5.64] = P[F5, 10 d.f. 6.87] = 0.005
Using the F tables (continued) so the value we are looking for is 3.33, for this value P[F5, 10 d.f. 3.33] = n note that since this is a 1 tailed value, then P[F5, 10 d.f. 3.33] = è so the two sides sum to 1 Also note that if we reverse the d.f., we find that P[F10, 5 d.f. 4.74] = 0.050, so the F values generally differ when d.f. are reversed
More working with F tables n Only the upper tail of the distribution is given. There are three reasons for this. l The F tests in Analysis of Variance (ANOVA) are usually one tailed tests, where the lower tail is not needed. l The need to calculate the lower tail can be eliminated in some two-tailed cases. l The value of F for the lower tail can be found by transformation of values from the upper tail.
n It is possible to calculate the value of the lower tail from the tables providing the values for the upper tail. To obtain the lower tail for a value F 1, 2 for a particular value of First obtain the value in the upper tail for F 2, 1 for the same value of (note the change in order of the d.f.) Then calculate 1/F 2, 1 to get the lower tail. Calculating lower tail values for the F distribution
Find F with (8,10) d.f. for = 0.05 find F = 0.05/2, 8, 10 lower and F = 0.05/2, 8, 10 such that P[F = 0.975, 8, 10 F F = 0.025, 8, 10]=0.950 where 1 = 8 and 2 = 10 F table : two-tailed example
F table : two-tailed example (continued) n For the upper tail, the value we are looking for is 3.85, for this value P[F8, 10 3.85] = note that we use only /2 as the probability for one of the two tails
F table : two-tailed example (continued) n in order to find the lower tail, we reverse the d.f., we find that P[F10, 8 4.30] = and then calculate n F8, 10 d.f. lower limit = 1/F10,8 = 1/4.30 = n note the reversal of the order of the degrees of freedom n
n The concentration of blue green algae was obtained for 7 phytoplankton-density samples taken from each of two lake habitats. Determine if there is a difference in the variability of phytoplankton density between the two habitats. 1) H0: 2 = 2 2) H0: 2 2 Numerical example of an F-test of hypothesis
Numerical example of an F-test of hypothesis (continued) n 3) Assume: Independence (randomly selected samples) and that BOTH populations are normal 4) = 0.05 n 5) Draw a sample of 7 from each habitat, calculate the variances and the F ratio.
Habitat 1Habitat 2 Observation Observation Observation Observation Observation Observation Observation Numerical example of an F-test of hypothesis (continued)
StatisticHabitat 1Habitat 2 Yi Yi CF 66 S S Mean ( Y) Numerical example of an F-test of hypothesis (continued)
n Then calculate the F value as; n F = S12 / S22 = 6.95 / = ) Calculate the critical region, given =0.05 and a TWO TAILED alternative, and knowing that the degrees of freedom are 1=6 and 2=6, (note that both are equal).
Numerical example of an F-test of hypothesis (continued) n Calculate P[Flower F Fupper] = P[Flower F] + P[F Fupper] = P[F Fupper] = we can get directly from the table, F =0.05, 6, 6 = 5.82 P[Flower F] = we calculate as 1/P[F Fupper] = 1/5.82 = n This case is uncommon because d.f. upper = d.f. lower, so the F values are the same.
Numerical example of an F-test of hypothesis (continued) n 6 continued) From the critical limits we can state that P[Flower F Fupper] = P[ F 5.82] = 0.05 n and since our calculated F value is between these values (F = ) we would fail to reject the Null Hypothesis, concluding that the data is consistent with the Null Hypothesis. (But it was close.)
Some notes on F tests n NOTE that in this case the smaller value fell in the numerator. As a result, we were comparing the F value to the lower limit. n However, FOR TWO TAILED TESTS, IT MAKES NO DIFFERENCE WHICH FALLS IN THE NUMERATOR, AND WHICH IN THE DENOMINATOR. As a result, we can ARBITRARILY place the LARGER value in the numerator, and COMPARE THE F value to the UPPER LIMIT.
Some notes on F tests (continued) n This saves calculating the lower limit. è i.e. Calculate F = S2larger /S2smaller BUT, don't forget that this arbitrary placing of the larger variance estimate in the NUMERATOR is done for TWO SAMPLE TESTS ONLY, and that therefore we want to test against F /2.
Some notes on F tests (continued) n Three common cases in F testing (actually two common and one not so common). 1) Frequently, particularly in ANOVA (to be covered later), we will test H0: 2 2 against the alternative, H1: 2 2. n then we ALWAYS form the F value as F = S12 / S22. We put the one we EXPECT to be larger in the numerator for a one tailed test! n If F < 1 we don't even need to look up a value in the table, it cannot be "significant".
Some notes on F tests (continued) 2) Normal 2 tailed tests (common in 2 sample t- tests to be covered later) will test H0: 2 2 against the alternative, H1: 2 2. è then we can form the F value as F=S2larger/S2smaller. This is a 2-tailed test and it is tested against the upper tail with /2 in the upper tail. è There is no way that we can get a calculated F < 1.
Some notes on F tests (continued) 3) If both the upper and lower bounds are required (not common, found mostly on EXAMS in basic statistics) then we will be testing H0: 2 2 against the alternative H1: 2 2. n We can form the F value any way we want, with either the larger or smaller variance in the numerator. This is a 2 tailed test with /2 in each tail, and F can be any value (0 to )
Summary The F distribution is ratio of two variances (i.e. two Chi square distributions) and is used test used to test two variances for equality. H0: 12 = 22 The distribution is an asymmetrical distribution with values ranging from 0 to , and an expected value of 1. n The F tables require two d.f. (numerator and denominator) and give only a very few critical values.
Summary (continued) Many, perhaps most, F tests will be directional. For the tests the variance that is EXPECTED to be larger goes in the numerator whether it is larger or not and we test against the upper tail with a probability equal to . For the non-directional alternative we may arbitrarily place the larger variance in the numerator and test against the upper tail, but don't forget to test against /2.