Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental design and analysis.

Similar presentations


Presentation on theme: "Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental design and analysis."— Presentation transcript:

1 Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental design and analysis Testing statistical hypotheses

2 Simple null hypothesis Test of hypothesis that population mean equals a particular value (H O :  =  ) –eg. Population mean density of limpets per quadrat at Cheviot Beach is 17 –eg. Population mean diameter of mountain ash seedlings in Sherbrook forest is 20cm These values may be from literature or other research

3 Example Take a sample (size n) from population and calculate sample mean –eg. A sample of 15 quadrats from Cheviot Beach Calculate –sample mean11.33 –sample standard deviation10.03 –standard error2.59

4 Testing H O How do we test H O that  = 17? Set up normally-distributed population with  = 17 and known variance (  2 ) –generate this population with random number generator on computer Repeatedly sample (n = 15) from this population –eg. Take 1000 samples of size 15

5 Calculate mean for each sample –eg. 1000 sample means Probability (frequency) distribution of sample means –sampling distribution of sample means –probability distribution of sample means when H O is true

6 Sampling distribution of sample means Pr( y ) 17 Normal distribution with mean of 17 and standard deviation of  /  n (standard error)

7 Testing H O If H O is true, what is probability of getting sample with mean of 11.3 from a population with mean of 17? What is probability of getting sample mean of 11.3 from previous sampling distribution of sample means? –If probability is small, then reject H O –If probability is large, then do not reject H O

8 Pr( y ) 17 Normal distribution with mean of 17 and standard deviation of  /  n (standard error) 11.3

9 Sampling distributions? Can we work out sampling distribution of sample means without repeated sampling? –Does this sampling distribution have a mathematical basis? Not easily –Infinite number of sampling distributions for each combination of  and .

10 t statistic Modify sample mean: This statistic (sample mean - population mean divided by standard error of sample mean) is t statistic and follows t distribution. Value of mean specified in H O

11 t statistic General form of t statistic: where S t is sample statistic,  is parameter value specified in H O and SE is standard error of sample statistic. Specific form for population mean: Value of mean specified in H O

12 Statistical hypothesis testing Statistical null hypothesis (H O ): –an hypothesis of no difference (or no relationship or no effect). H O refers to population parameters: –e.g. no difference between population means or no correlation in the population. If H O is false, then H A (alternative hypothesis) must be true.

13 Test statistics Sampling distributions of t, one for each sample size, when H O true –use degrees of freedom (df = n - 1) Sampling (probability) distributions of t when H O is true Probabilities of obtaining particular values of test statistic when H O is true

14 Sampling distribution of t  df0.100.050.010.001 13.0786.31431.821318.309 21.8862.9206.96522.327 31.6382.3534.54110.215 201.3251.7252.5283.552  1.2821.6452.3263.090  Pr(t) t = 0t > 0t < 0

15 Decision criterion How low a probability should make us reject H O ? If probability is less than significance level (  ), then reject H O ; otherwise do not reject. Convention sets significance level:  = 0.05 (5%) Arbitrary: –other significance levels are valid.

16 One tailed tests H O :  0 So only reject H O for large +ve values of t, i.e. when sample mean is much greater than 0.  = 0.05 Pr(t) t = 0t > 0t < 0

17 Two tailed tests H O :  = 0 H A :  > 0 or  < 0 So reject H O for large +ve or -ve values of t, i.e. when sample mean is much greater than or less than 0. Pr(t) t = 0t > 0t < 0  / 2 = 0.025  = 0.05

18 t-tests H O :  = 0 (or any other pre-specified value) single population df = n - 1

19 H O :  1 =  2, i.e.  1 -  2 = 0 two populations with independent observations df = (n 1 - 1) + (n 2 - 1) = n 1 + n 2 - 2

20 Examples No difference in mean breathing rate of buccal breathing toads and lung breathing toads No difference in mean needle length between red and white spruce trees (Parrish 1995)

21 H O :  d = 0 d is difference between between paired observations df = n - 1 where n is number of pairs

22 Examples No difference in size of webs of orb- spinning spiders in light compared to dark - same spiders used in both light regimes (Elgar et al. 1996). No difference in annual leaf production between 2 years for same trees of a tropical palm (Olmsted & Alvarez-Buylla 1995).

23 Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Testing a statistical null hypothesis

24 Worked example Breathing rate of cane toads: –sample of 8 lung breathing toads and sample of 13 buccal breathing toads. Breathing rate (no. breaths per minute) recorded for each toad. Null hypothesis: –No difference in breathing rate between lung-breathing toads and buccal-breathing toads.

25 Specify Ho and choose test statistic: Ho:  L =  B, i.e. population mean breathing rate for lung-breathing toads and buccal-breathing toads are equal. Appropriate test statistic for comparing population means - t statistic.

26 Specify a priori significance (probability) level (  ): By convention, use  = 0.05 (5%).

27 Do experiment - calculate test statistic from sample data: MeanSDn Lung:2.371.738 Buccal:4.721.1813 t = 3.74, df = 19

28 Compare value of t statistic to its sampling distribution, the probability distribution of statistic when H O is true: What is probability of obtaining t value of 3.74 or bigger when H O is true? What is probability of obtaining t value of 3.74 or bigger from t distribution with 19df?

29 Probability (from SYSTAT) P = 0.001 Look up in t table P < 0.05

30 If probability of obtaining this value or larger is less than , conclude H O is “unlikely” to be true and reject it: –statistically significant result Our probability (0.001) is less than 0.05 so reject H O : –statistically significant result.

31 If probability of obtaining this value or larger is greater than , conclude that H O is “likely” to be true and do not reject it: –statistically non-significant result

32 Presenting results of t test Methods: –An independent t test was used to compare breathing rates of buccal and lung breathing toads. Assumptions were checked with…. Results: –The breathing rate of buccal breathing toads was significantly faster than that of lung breathing toads (t = 3.74, df = 19, P = 0.001; see Fig. 2).

33 P values Not the probability that H O is true! Probability of obtaining our sample data if H O is true [P(data|H O )]. Strictly, long run probability from repeated sampling of obtaining sample result if H O is true. Probability of sample result occurring by chance in the long run if H O is true.

34 Assumptions of t test The t test is a parametric test The t statistic only follows t distribution if: –variable has normal distribution (normality assumption) –two groups have equal population variances (homogeneity of variance assumption) –observations are independent or specifically paired (independence assumption)

35 Normality assumption Data in each group are normally distributed Checks: –frequency distributions –boxplots –formal tests for normality

36 Homogeneity of variance Population variances equal in 2 groups Checks: –subjective comparison of sample variances –boxplots –F-test of H O :  1 2 =  2 2

37 F-test on variances H O :  1 2 =  2 2 F statistic (F-ratio) = ratio of 2 sample variances –F = s 1 2 / s 2 2 –Reject H O if F 1 If H O is true, F-ratio follows F distribution Usual logic of statistical test

38 Nonparametric tests Usually based on ranks of the data. H O : samples come from populations with identical distributions –equal means or medians Don’t assume particular underlying distribution of data –normal distributions not necessary. Equal variances and independence still required.

39 Mann-Whitney-Wilcoxon test Calculates sum of ranks in 2 samples –should be similar if H O is true Comapres rank sum to sampling distribution of rank sums –distribution of rank sums when H O true Equivalent to t test on data transformed to ranks.


Download ppt "Copyright, Gerry Quinn & Mick Keough, 1998 Please do not copy or distribute this file without the authors’ permission Experimental design and analysis."

Similar presentations


Ads by Google