Presentation on theme: "Statistical Techniques I"— Presentation transcript:
1Statistical Techniques I EXST7005The F distribution
2The F test This test can be used to either, test the equality of population variances - our present topictest the equality of population means (this will be discussed later under ANOVA)The F test is the ratio of two variances (the ratio of two chi square distributions)Given two populationsPopulation 1 Population 2Mean m m2Variance s s2
3The F test (continued) Two populations Draw a sample from each populationPopulation 1 Population 2Sample size n n2d.f g g2Sample mean `Y `Y2Sample variance S S2
4The F test (continued) To test the Hypothesis H0: s12 = s22 H1: s12 ¹ s22 (one sided also possible)use F = s12 / s22which 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.
5The F distribution1) The F distribution is another family of distributions, each specified by a PAIR of degrees of freedom, g1 and g2.g1 is the d. f. for the numeratorg1 is the d. f. for the denominatorNote: 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 £ ¥].
6The F distribution (continued) 3) There is a different F distribution for every possible pair of degrees of freedom.4) In general, an F value with g1 and g2 d.f. is not the same as an F value with g2 and g1 d.f., so order is important.i.e. Fg1,g2 ¹ Fg2,g1 usually5) The expected value of any F distribution is 1 if the null hypothesis is true.
7The F distribution F distribution with 1, 5 d.f. 0.000.501.001.502.002.503.003.504.00
8The F tables1) The numerator d.f. (g1) are given along the top of the page, and the denominator d.f. (g2) are given along the left side of the page.Some tables give only one F value at each intersection of g1 and g2. The whole page would be for a single a value and usually several pages would be given.
9The F tables (continued) Our tables will give four values at the intersection of each g1 and g2, each for a different a value. These a values are given in the second column from the left.Our tables will have two pages.Only a very few probabilities will be available, usually 0.05, 0.025, 0.01 and 0.005, and sometimesOnly the upper tail of the distribution is given.
11Working with F tablesThe 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 valueFind the corresponding F value.
12Using the F tables EXAMPLE of F table use, one tailed example: Find F with (5,10) d.f. for a = 0.05find F0.05 such that P[F ³ F0.05, 5, 10 d.f. ] = 0.050where g1 = 5 and g2 = 10
13Using the F tables (continued) For F5, 10 d.f. The tabular values are listed as 3.33, , ,These representP[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] =
14Using the F tables (continued) so the value we are looking for is 3.33, for this value P[F5, 10 d.f. ³ 3.33] = 0.050note that since this is a 1 tailed value, thenP[F5, 10 d.f. £ 3.33] = 0.950so the two sides sum to 1Also note that if we reverse the d.f., we find that P[F10, 5 d.f. ³ 4.74] = , so the F values generally differ when d.f. are reversed
15More working with F tables Only the upper tail of the distribution is given. There are three reasons for this.The F tests in Analysis of Variance (ANOVA) are usually one tailed tests, where the lower tail is not needed.The need to calculate the lower tail can be eliminated in some two-tailed cases.The value of F for the lower tail can be found by transformation of values from the upper tail.
16Calculating lower tail values for the F distribution 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 Fg1,g2 for a particular value of aFirst obtain the value in the upper tail for Fg2,g1 for the same value of a (note the change in order of the d.f.)Then calculate 1/Fg2,g1 to get the lower tail.
17F table : two-tailed example Find F with (8,10) d.f. for a = 0.05find Fa = 0.05/2, 8, 10 lower and Fa = 0.05/2, 8, 10 such thatP[Fa = 0.975, 8, 10 £ F £ Fa = 0.025, 8, 10]=0.950where g1 = 8 and g2 = 10
18F table : two-tailed example (continued) For the upper tail, the value we are looking for is 3.85, for this valueP[F8, 10 ³ 3.85] = 0.025note that we use only a/2 as the probability for one of the two tails
19F table : two-tailed example (continued) in order to find the lower tail, we reverse the d.f., we find thatP[F10, 8 ³ 4.30] = and then calculateF8, 10 d.f. lower limit = 1/F10,8 = 1/4.30 =note the reversal of the order of the degrees of freedom
20Numerical example of an F-test of hypothesis 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: s12 = s222) H0: s12 ¹ s22
21Numerical example of an F-test of hypothesis (continued) 3) Assume: Independence (randomly selected samples) and that BOTH populations are normal4) a = 0.055) Draw a sample of 7 from each habitat, calculate the variances and the F ratio.
22Numerical example of an F-test of hypothesis (continued) Habitat 1Habitat 2Observation 17.65.9Observation 20.43.8Observation 31.16.5Observation 43.218.3Observation 56.518.2Observation 64.116.1Observation 74.77.6
23Numerical example of an F-test of hypothesis (continued) StatisticHabitat 1Habitat 2SYi27.676.4SYi2150.521074.6CF41.70240.75g66S26.9540.12S2.646.33Mean (`Y)3.9410.91
24Numerical example of an F-test of hypothesis (continued) Then calculate the F value as;F = S12 / S22 = 6.95 / =6) Calculate the critical region, given a=0.05 and a TWO TAILED alternative, and knowing that the degrees of freedom are g1=6 and g2=6, (note that both are equal).
25Numerical example of an F-test of hypothesis (continued) CalculateP[Flower £ F £ Fupper] = P[Flower £ F] + P[F ³ Fupper] =P[F ³ Fupper] = we can get directly from the table, Fa=0.05, 6, 6 = 5.82P[Flower £ F] = we calculate as1/P[F ³ Fupper] = 1/ =This case is uncommon because d.f. upper = d.f. lower, so the F values are the same.
26Numerical example of an F-test of hypothesis (continued) 6 continued) From the critical limits we can state thatP[Flower £ F £ Fupper] =P[ £ F £ 5.82] = 0.05and 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.)
27Some notes on F testsNOTE that in this case the smaller value fell in the numerator. As a result, we were comparing the F value to the lower limit.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.
28Some notes on F tests (continued) This saves calculating the lower limit.i.e. Calculate F = S2larger /S2smallerBUT, 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 Fa/2.
29Some notes on F tests (continued) 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: s12 = s22 against the alternative, H1: s12 s22.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!If F < 1 we don't even need to look up a value in the table, it cannot be "significant".
30Some notes on F tests (continued) 2) Normal 2 tailed tests (common in 2 sample t-tests to be covered later) will test H0:s12=s22 against the alternative, H1:s12¹s22.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 a/2 in the upper tail.There is no way that we can get a calculated F < 1.
31Some 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:s12=s22 against the alternative H1:s12¹s22.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 a/2 in each tail, and F can be any value (0 to ¥)
32SummaryThe 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: s12 = s22The distribution is an asymmetrical distribution with values ranging from 0 to ¥, and an expected value of 1.The F tables require two d.f. (numerator and denominator) and give only a very few critical values.
33Summary (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 a.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 a/2.