Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ecology reporting and statistical analysis

Similar presentations


Presentation on theme: "Ecology reporting and statistical analysis"— Presentation transcript:

1 Ecology reporting and statistical analysis
Chris Luszczek Biol2050

2 Introduction Please treat this slide show as a statistics manual for Biol2050 This tutorial will provide you with the basics of various common statistical methods and examples of how to perform these tests using SPSS statistical software available in York computer labs and accessible from home using York’s remote File Access System (FAS) *WARNING* The FAS may involve a lengthy installation procedure and I have found it to be finicky, sometimes requiring multiple tempts at installation. Be aware of this if you are downloading the software at home… at midnight the evening before your report is due.

3 Outline 1) Hypothesis Building 2) Hypothesis Testing
Null hypothesis/alternate hypothesis 2) Hypothesis Testing 3) Common Statistical tests and how to run them Correlation t-test ANOVA 4) Graphing – how to present your findings Types of graphs and usage formatting

4 1) Hypothesis Building Creating testable hypothesis is central to scientific method Null (Ho) hypothesis – ‘no effect’ or ‘no difference’ between samples or treatments Alternative (Ha) hypothesis – experimental treatment has a certain statistically significant A claim for which we are trying to find evidence Example Ho: “Different habitats on the York university campus display no differences in diversity” (Ho: x2=x1 or x2-x1=0) Ha: “Grassland habitats at York University contain higher diversity than managed or landscaped areas” (Ha: x2>x1or x2-x1> 0) Hypotheses can never be proven only disproven. Any hypothesis can not be proved to be true until all possible antitheses are indisputably disproved..... even then none can be sure whether every possible antithesis has been considered and dealt with.

5 2) Hypothesis Testing Either reject or fail to reject the H0 based on statistical testing Statistical testing compares the p-value of observed data to an assigned significance level (α) p-value – the frequency or probability with which the observed event would occur α = the probability that the outcome did not occur by chance Popular levels of significance are 5% (0.05), 1% (0.01), and 0.1% (0.001) IF p-value is smaller than α reject the null hypothesis (H0) The power of a statistical test is the probability that the test will reject the null hypothesis when the null hypothesis is false (i.e. the probability of not committing a Type II error, or making a false negative decision).

6 Hypothesis Testing Visual Summary
Are the means significantly different? Sample distribution 1 Sample distribution 2 Identifying differences that are likely due to forces beyond chance. Distributions Errors Significance level Power 1-β Testing for and assuming normality Mean 1 Mean 2

7 3) Common Statistical Tests in Ecology
T-tests ANOVA - Analysis Of VAriance Correlation

8 Common Statistical Tests in Ecology
T-tests: used to determine if two sets of data (2 means) are significantly different from each other. It assumes that data is normally distributed and samples are equal. 2 decisions must be made when selecting a t-test: Paired vs. independent 1-tailed vs 2-tailed ANOVA - Analysis Of VAriance Correlation

9 3A) T-test One-sample (paired) t-test: Compares two samples in cases where each value in one sample has a natural partner in the other (data are not independent). Used on pre/post data . Also compares a sample mean to a specified value Comparing patient performance before and after the application of a drug (repeated measures sampling – the same subjects are measures before and after treatment) Two- sample (Independent) t-test:  compares means for two groups of cases. Comparing patient performance in a group receiving a drug versus a separate group receiving a trial drug

10 3A) T-test One-tailed/sided t-test: expect the effect to be in a certain direction “is the sample mean greater than µ?” “is the sample mean less than µ?” H0 : µ = 𝜇 0 , where 𝜇 0 is known HA : µ > 𝜇 0 or µ < 𝜇 0 Two-tailed/sided t-test: testing for different means regardless of direction “is there a significant difference?” H0 : 𝜇 1 = 𝜇 2 HA : 𝜇 1 ≠ 𝜇 2

11 Match Your Hypothesis and Test!
A carefully stated experimental hypothesis with indicate the type of effect you are looking for For example, the hypothesis that "Coffee improves memory“ – suggests paired, one tailed because you will repeatedly measure the same participants and expect an improvement. "Men weigh a different amount from women“ - suggests an independent two tailed test as no direction is implied. So remember, don't be vague with your hypothesis if you are looking for a specific effect! Be careful with the null hypothesis too - avoid "A does not effect B" if you really mean "A does not improve B".

12 Running a T-test in SPSS
Question: Do the fish in lake 1 and lake 2 weigh the same? Null hypothesis: 𝜇 1 = 𝜇 2 (the fish in lake 1 weigh the same as the fish in lake 2) An independent, 2-tailed test! Alternative hypothesis : 𝜇 1 ≠ 𝜇 2 (the fish in lake 1 and lake 2 DO NOT weigh the same)

13 1) 2) Sometimes SPSS can be tricky about access directories on your computer while using it remotely on the citrix receiver. I find it best to save your data on your C: drive or else on a removable USB drive – these seem to be the most common easily accessed drives 2 views SPSS generates a type of meta data sheet called the variable view. Data from an excel sheet can be opened in SPSS –Sometimes will automatically see a summary of your data rather than the data – to correct: Click Data view tab rather than Variable view

14 Data View / entry

15 Select Analyze  compare means  independent samples t test
Weight is the test variable Lake is the grouping variable (Click on define groups and type the two names used in the data view)

16 Output Levene’s test – Assesses if variances are equal, if greater p > 0.05 you can interpret the t results * Given the quality of data collected in these labs assume that the data fulfills the Levene’s test and go on to interpret t-test* Our example: Levene’s (p = 0.669) so we can interpret the t-test (p = 0.01) so we can reject the null hypothesis, thus the fish from lake 1 and lake 2 DO NOT weigh the same. How to report: two-sample t(df) = t-value, p = p-value (two-sample t(12) = , p = 0.01)

17 Common Statistical Tests in Ecology
T-tests: ANOVA - Analysis Of VAriance Comparing more than two groups of means Compares variance within groups and between groups Parametric, extension of two-tailed t-test Correlation:

18 3B) ANOVA Analysis Of VAriance (ANOVA) Examples:
Is tree density at all York habitats the same? Does insect diversity in York grasslands differ from insect diversity in York woodlots and human impacted? 3 means being compared H0 : µ1 = µ2 = µ3 = … = µk where k = number of related groups HA: one or more means are different

19 Running an ANOVA You sample four fish from each of three lakes to determine if the fish from the three lakes all weight the same. H0 : There is no difference in fish weight between lakes H0 : 𝜇 𝐿𝑎𝑘𝑒 1 = 𝜇 𝐿𝑎𝑘𝑒 2 = 𝜇 𝐿𝑎𝑘𝑒 3 HA : 𝜇 𝐿𝑎𝑘𝑒 1 ≠ 𝜇 𝐿𝑎𝑘𝑒 2 ≠ 𝜇 𝐿𝑎𝑘𝑒 3 Select Analyze  compare means  one way ANOVA *Important* Select post hoc Tukey  continue  OK Running the ANOVA will identify IF differences between groups exist. Running a post hoc test will test all combinations to determine WHICH groups are difference from each other

20 Sig. difference between groups
Lake 1 and 2 are not significantly different but both are sig. different from lake 3 (based on α = 0.05)

21 Common Statistical Tests in Ecology
T-tests ANOVA - Analysis Of VAriance Correlation: Indicates the strength and direction of a linear relationship between two random variables H0 : no relationship between variables HA : there is a relationship between variables

22 3C) Correlation Pearson’s Correlation Coefficient (r) – measures the relationship between two variables r always lies between -1 and +1 Positive r-values means that the two variables increase with each other. Negative r-values mean they decrease with each other r-values close to zero mean the variables have no relationship. r-values close to either -1 or 1 mean the relationship is strong. Generally, for ecological data, r greater than 0.5 is considered very strong and a correlation less than 0.2 is considered weak. R2 (coefficient of determination) is the percent of the data that is closest to the line of best fit or a measure of how well the regression lines represents the data. r = correlation coefficient The Pearson product-moment correlation coefficient is a common measure of the correlation (linear dependence) between two variables X and Y. It is very widely used in the sciences as a measure of the strength of linear dependence between two variables, giving a value somewhere between +1 and -1 inclusive. Correlation coeffcient ( r) vs coefficient of determination (r2 or R2) The coefficient of determination, r 2, is useful because it gives the proportion of        the variance (fluctuation) of one variable that is predictable from the other variable.       It is a measure that allows us to determine how certain one can be in making       predictions from a certain model/graph.    The coefficient of determination is the ratio of the explained variation to the total       variation.    The coefficient of determination is such that 0 <  r 2 < 1,  and denotes the strength       of the linear association between x and y.      The coefficient of determination represents the percent of the data that is the closest       to the line of best fit.  For example, if r = 0.922, then r 2 = 0.850, which means that       85% of the total variation in y can be explained by the linear relationship between x       and y (as described by the regression equation).  The other 15% of the total variation       in y remains unexplained.    The coefficient of determination is a measure of how well the regression line       represents the data.  If the regression line passes exactly through every point on the       scatter plot, it would be able to explain all of the variation. The further the line is       away from the points, the less it is able to explain. r² = coefficient of determination There are several different definitions of R² which are only sometimes equivalent. One class of such cases includes that of linear regression. In this case, R² is simply the square of the sample correlation coefficient between the outcomes and their predicted values, or in the case simple linear regression, between the outcome and the values being used for prediction. In such cases, the values vary from 0 to 1. Important cases where the computational definition of R² can yield negative values, depending on the definition used, arise where the predictions which are being compared to the corresponding outcome have not derived from a model-fitting procedure using those data. R² is a statistic that will give some information about the goodness of fit of a model. In regression, the R² coefficient of determination is a statistical measure of how well the regression line approximates the real data points. An R² of 1.0 indicates that the regression line perfectly fits the data.

23 Correlation Example 1 Is there a relationship between the bird diversity and plant diversity in a given habitat? H0 : no relationship between variables HA : there is a relationship between variables r=0.3

24 Correlation Example 2 Is there a relationship between plant density and a) bare ground b) soil pH c) species richness? H0 : no relationship between variables HA : there is a relationship between variables

25 Running a Correlation Hypothesize that there is a relationship between mean fish length and lake size (larger lakes might have larger fish). Collected data from 21 lakes. Select Graphs  legacy dialogs  scatter  define (lake size x variable and fish length y variable)

26 Select Graphs  legacy dialogs  scatter  define (lake size x variable and fish length y variable)

27 r = 0.824 p < 0.001 Therefore, there is a HIGHLY SIGNIFICANT, STRONG, POSITIVE relationship between fish length and lake size. p value is calculated behind the scenes but is essentially produced by running a 2 tailed t-test with the null hypothesis that the correlation coeeficient is 0 (no correlation). It is tested as a 2 tailed test because the Ha (correlation) can be positive or negative.

28 Outline 1) Hypothesis Building 2) Hypothesis Testing
Null hypothesis/alternate hypothesis 2) Hypothesis Testing 3) Common Statistical tests and how to run them Correlation t-test ANOVA 4) Graphing – how to present your findings Types of graphs and usage formatting

29 Choosing Graphs Your hypothesis and statistical test should guide your choice of figures! As we have seen some tests are related to specific figures Correlations and Scatter plots The following slides outline the basic use of several common graphs Scatter plots Line Graphs Bar graphs Histograms All graphs are figures vs. tables Figures should be accompanied by captions. Figure captions should be below the image and contain certain information. what the Table or Figure tells the reader what results are being shown in the graph(s) including the summary statistics plotted the organism studied in the experiment (if applicable), context for the results: the treatment applied or the relationship displayed, etc. location (ONLY if a field experiment), specific explanatory information needed to interpret the results shown (in tables, this is frequently done as footnotes) culture parameters or conditions if applicable (temperature, media, etc) as applicable, and, sample sizes and statistical test summaries as they apply. Do not simply restate the axis labels with a "versus" written in between.

30 Scatter plot Displays 2 variables for a set of data
Dependant vs. independent – one variable is under the control of the other variable (Regression Analysis) OR If we have no dependent variable, a scatter plot will show the degree of correlation (NOT CAUSATION!)

31 Line graph Shows relationship between values plotted on each axis (dependant vs. independent) Used on continuous variables

32 Bar graph Used for discreet quantitative variables which are similar but not necessarily related Often use ANOVA to test difference

33 Making Proper Error bars in Excel
Excel will apply the same error to all bars if you use the automatic error bar feature. To produce proper, interpretable error bars you must: 1) Calculate standard error for your data: - First calculate standard deviation using the “STDEV.S” function - Then divide standard deviation by the square root of n (observations per group) to give you Standard Error. 2) Different versions of excel hide the ‘custom error bar’ option in different places – - try selecting the data bars  right click  select ‘format data series’  ‘error bars’ OR - try clicking the graph  move to ‘layout’ under ‘chart tools’ tab  ‘error bars’ 3) select ‘custom’ and ‘specify value’ 4) Be sure to select the ‘range’ of SE values to match the range of selected data for both the positive and negative error value

34 Proper Error Bars 1) 2) 3) 4) See previous slide for explanation of steps.

35 Histogram Used exclusively for showing the distribution of data that are continuous.

36 Conclusion This tutorial has provided you with the basic theory, mechanics and applications of common statistical tests. You should now be able to carry out scientific reporting from hypothesis formation to statistical testing and figure formatting.


Download ppt "Ecology reporting and statistical analysis"

Similar presentations


Ads by Google