The independent ‘cause’ variable is measured without error. [[Go|57]]\n\nThere is known to be some measurement error associated with the independent variable: a model II [[regression|http://en.wikipedia.org/wiki/Linear_regression]] is required, or [[Kendall robust line-fit|http://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator]] method. This is a rarely used technique and only occasionally appears in statistical packages. It has the odd property of always overestimating the slope of the relationship compared to the result from a normal (model I) regression.

There is one independent ‘cause’ variable and one dependent ‘effect’ variable: use Kendall robust line-fit method. If this is not available consider reframing (usually by simplifying) your hypothesis somewhat to fit a non-parametric correlation. The only other alternative is to continue to a parametric test, being very cautious with interpretation of the results. [[Go|55]]\n\nAll other designs: there is no satisfactory non-parametric test and certainly nothing in a statistical package yet. Either reframe the hypothesis or [[continue|55]] with a parametric test. If there are two ‘cause’ variables and one ‘effect’ then the ‘cause’ variables might be divided into a small number of categories (e.g. low, medium and high) and then a Scheirer–Ray–Hare test could be carried out. [[Go|55]]

The data set is normally distributed within each factor combination, there are at least 30 possible values and variances are approximately equal: two-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]], measure of the interaction between the two factors is possible.\n\nThe data set is not as above. Versions of a non-parametric, but low-power, equivalent of a two-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] making fewer assumptions about the data (i.e. non-parametric) are a fairly recent innovation and are not yet appearing in statistical packages. If the experiment is balanced, or nearly so (i.e. there are the same number of observations for each combination of factor levels): carry out a Scheirer–Ray–Hare test. This will, almost certainly, not be in your statistical package but can still be carried out with a little modification of other tests.

There are two variables: if you follow this thread further you will reach tests that are often awkward to carry out in packages and are often easier to calculate by hand. If you do calculate them by hand you may have to look up the significance level using a c2 table. [[Go|49]]\n\nThere are more than two variables: simultaneous comparisons of frequencies for more than two classifications are very difficult to interpret. It is best to compare them [[pairwise|http://en.wikipedia.org/wiki/Pairwise_comparison]].

(Note: there are no non-parametric tests available from here on so if the data set does not fit the assumptions of the test you have no alternatives. [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] is quite robust to failure to meet its assumptions but be aware, especially if results are close to significance thresholds.) \n\nAll factors (ways of grouping the data) are independent of each other. [[Go|44]]\n\nAt least one factor is nested in another (e.g. in an experiment the variable is blood sugar level in mice. The factors are litter, female and food provided. If there are two litters from each of two females then litter will be ‘nested’ within female. Neither litter nor female will be ‘nested’ within food). [[Go|45]]

You have arrived at principal component analysis, discriminant function analysis and other multivariate techniques for exploring your data. The usual result of this type of exploration is to identify simple relationships hidden in the mass of the data. \n\nThere are several observed variables that are approximately continuous and you have no preconceived notion about division into groups: use [[principal component analysis|http://en.wikipedia.org/wiki/Principal_component_analysis]].\n\nThere are a variety of variables that may be a combination of ‘causes’ and ‘effects’: use [[path analysis|http://en.wikipedia.org/wiki/Path_analysis_(statistics)]].\n\nThere are two or more sets of observations and one or more grouping variables: use multivariate analysis of variance ([[MANOVA|http://en.wikipedia.org/wiki/Multivariate_analysis_of_variance]]).\n\nThere are two or more sets of observations, one or more grouping variables and a recorded variable that is known to affect the observed variables (e.g. temperature): use multivariate analysis of covariance ([[MANCOVA|http://en.wikipedia.org/wiki/MANCOVA]]).\n\nThere are several observed variables for each individual that are approximately continuous and individuals have already been assigned to groups (e.g. species): use [[canonical variate analysis|http://en.wikipedia.org/wiki/Canonical_analysis]].\n\nThere are several observed variables for each individual that are approximately continuous, individuals have already been assigned to groups (e.g. species) and the intention is to assign further individuals to appropriate groups: use [[discriminant function analysis|http://en.wikipedia.org/wiki/Discriminant_function_analysis]].\n\nThere are several observed variables for each individual that are categorical or nominal, individuals have already been assigned to groups (e.g. species) and the intention is to assign further individuals to appropriate groups: use [[logistic regression|http://en.wikipedia.org/wiki/Logistic_regression]].\n\nThere are several observed variables for each individual and you wish to determine which individuals are most similar to which: use [[cluster analysis|http://en.wikipedia.org/wiki/Cluster_analysis]].\n\nYou have data on the relative abundance of species from various sites and wish to determine similarities between sites: use [[cluster analysis|http://en.wikipedia.org/wiki/Cluster_analysis]], or [[TWINSPAN|http://en.wikipedia.org/wiki/Two-way_indicator_species_analysi]].

It may be a surprising revelation, but choosing a statistical test is not an exact science. There is nearly always scope for considerable choice and many decisions will be made based on personal judgements, experience with similar problems or just a simple hunch. There are many circumstances under which there are several ways that the data could be analysed and yet each of the possible tests could be justified.\n\nA common tendency is to force the data from your experiment into a test you are familiar with even if it is not the best method. Look around for different tests that may be more appropriate to the hypothesis you are testing. In this way you will expand your statistical repertoire and add power to your future experiments.\n\n[[Start|1]]

The dependent variable is discrete, or not normally distributed or ranked. Be warned that non-parametric regression is required and that this is rarely available in a statistical package. [[Go|54]]\n\nThe dependent, or ‘effect’, variable is continuous and at least approximately normally distributed with the same variation in ‘effect’ for any given value of the ‘cause’ variable. [There will often be a requirement for a transformation of the data. Proportions and percentages can be transformed using the arcsine transformation or probits. Other distributions may be normalized using reciprocal transformations or many other possibilities. It is important that efforts are made to fulfil the requirements for approximately normal data with equal variance using transformations.] [[Go|55]]\n\nThe dependent ‘effect’ variable is a proportion or frequency (e.g. proportion of population with a disease). The ‘cause’ variable is measured without error and chosen or set by the experimenter: use [[logistic regression|http://en.wikipedia.org/wiki/Logistic_regression]].

(Note: partial and multiple correlations are difficult to interpret.)\n\nAll sets of data are continuous and approximately normally distributed, and you are interested in the direct level of association between pairs of variables: use pairwise measures of association using a [[Pearson’s correlation|http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient]].\n\nAll sets of data are continuous and approximately normally distributed, and you are interested in the overall pattern of association: use [[partial correlation|http://en.wikipedia.org/wiki/Partial_correlation]], which looks at the correlation between two variables while the others are held constant. ([[Multiple correlation|http://en.wikipedia.org/wiki/Multiple_correlation]] is a possibility but is rarely supported in packages. Its disadvantage is in interpretation and its inability to distinguish positive and negative relationships.)\n\nAbove do not apply, or you are cautious: carry out [[Kendall rank-order correlation coefficient|http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient]], a test that finds the correlation between two variables while a third is held constant. This may not be supported by your package. If it is not, pairwise testing is the only alternative.

If each variable is to be considered separately: [[go back|4]] and consider each variable in turn. [[Go|4]]\n\nTwo variables only: a two-dimensional [[scatterplot|http://en.wikipedia.org/wiki/Scatter_plot]] can be drawn. The choice of variable for x- and y-axes is free but if you suspect a possibility of ‘cause’ and ‘effect’ the ‘cause’ should always be on the x-axis. Do not draw a line of best fit even if it is offered by the package unless the situation is appropriate and you have carried out a [[regression analysis|http://en.wikipedia.org/wiki/Regression_analysis]].\n\nThree variables: a three-dimensional [[scatterplot|http://en.wikipedia.org/wiki/Scatter_plot]] can be drawn. It is very difficult to represent three dimensions on a two-dimensional sheet of paper or computer screen. You must drop spikes to the ‘floor’ or ‘origin’ of the graph, otherwise it is impossible to visualize the spread in the third dimension. It may be better to use a series of two-dimensional scatterplots instead. More than three variables: use a series of two-, or three-, dimensional scatterplots.

(Note: the distinction here will be slightly fuzzy in some cases, but essentially there are two basic types of test.)\n\nThe hypothesis is investigating differences and the null hypothesis is that there is no difference between groups or between data and a particular distribution [e.g. H1 (alternative hypothesis) = white-eye and carmine-eye flies have different mean development times, H0 (null hypothesis) = white-eye and carmine-eye flies have the same mean development time]. [[Go|26]]\n\nThe hypothesis is investigating a relationship and the null hypothesis is that there is no relationship [e.g. H1 (alternative hypothesis) = plant size is related to available phosphorous in the soil, H0 (null hypothesis) = plant size is not related to amount of available phosphorus]. [[Go|46]]

Data are collected as individual observations (e.g. height in centimetres). [[Go|29]]\n\nData are in the form of frequencies (e.g. when carrying out a plant cross and scoring the number of offspring of each type). [[Go|27]]

There are only two possibilities (e.g. white or pink). [[Go|28]]\n\nThere are more than two possibilities: carry out a [[G-test|http://en.wikipedia.org/wiki/G-test]], if your package supports it; otherwise use a [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit.\n\nThere are more than about eight possibilities: a [[Kolmogorov– Smirnov test|http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test]], may be more convenient than the [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit.

Unless the variable is definitely discrete or is known to have an odd distribution (e.g. not symmetrical): calculate the [[mean|http://en.wikipedia.org/wiki/Mean]].\n\nIf the data are known to be discrete or the data set is to be compared with other, discrete data with fewer possible values: calculate the [[median|http://en.wikipedia.org/wiki/Median]].\n\nIf you are particularly interested in the most commonly occurring value: calculate the [[mode|http://en.wikipedia.org/wiki/Mode_(statistics)]], in addition to the [[mean|http://en.wikipedia.org/wiki/Mean]] or [[median|http://en.wikipedia.org/wiki/Median]].

If the data are continuous and approximately normally distributed and you require an estimate of the spread of data: calculate the [[standard deviation|http://en.wikipedia.org/wiki/Standard_deviation]] (SD). (Note: standard deviation is the square root of variance and is measured in the same units as the original data.)\n\nIf you have previously calculated the mean and require an estimate of the [[range|http://en.wikipedia.org/wiki/Range_(statistics)]] of possible values for the [[mean|http://en.wikipedia.org/wiki/Mean]]: calculate 95% [[confidence limits|http://en.wikipedia.org/wiki/Confidence_interval]] for the mean (a.k.a. 95% confidence interval or 95% CI).\n\nA very rough measure of spread required: calculate the [[range|http://en.wikipedia.org/wiki/Range_(statistics)]]. (Note that this measure is very biased by sample size and is rarely a useful statistic in large samples.)\n\nIf you have a special interest in the highest and or lowest values in the sample: calculate the [[range|http://en.wikipedia.org/wiki/Range_(statistics)]].\n\nIf the data are known to be discrete or are to be compared with other, discrete, data or if you have previously calculated the median: calculate the [[interquartile range|http://en.wikipedia.org/wiki/Interquartile_range]].\n\n(Note: many people use [[standard error|http://en.wikipedia.org/wiki/Standard_error]] (SE) as a measure of spread. I think that the main reason for this is that it is smaller than either SD or 95% CI rather than for any statistical reason. Do not use SE for this purpose unless you are making a comparison to previously calculated SEs.)

If the data are continuous and normally distributed and you require an unbiased estimate of the symmetry of the data: calculate the [[skewness/asymmetry|http://en.wikipedia.org/wiki/Skewness]] of the data (g1). Skew is only worth calculating in samples with more than 30 observations.\n\nIf the data are continuous and normally distributed, you have calculated [[skewness|http://en.wikipedia.org/wiki/Skewness]] and you require an estimate of the ‘shape’ of the distribution of the data: calculate the [[kurtosis|http://en.wikipedia.org/wiki/Kurtosis]] (g2). (This is rarely required as a graphical representation will give a better understanding of the shape of the data. Kurtosis is only really worth calculating in samples with more than 100 observations.)\n\nIf you have already calculated the [[interquartile range|http://en.wikipedia.org/wiki/Interquartile_range]] and the [[median|http://en.wikipedia.org/wiki/Median]]: re-examine the interquartile range. The relative size of the interquartile range above and below the median provides a measure of the symmetry of the data.

You have not established the appropriate technique for a single sample: [[go back|16]] to find the appropriate techniques for each of the groups. You should find the same is appropriate for each sample or group. [[Go|16]]\n\nThe samples can be displayed separately: [[go back|17]] and choose the appropriate style. So that direct comparisons can be made, be sure to use the same scales (both x-axis and y-axis) for each graph. Be warned that statistical packages will often adjust scales for you. [[Go|17]]\n\nThe samples are to be displayed together on the same graph: use a chart with an ‘error bar’ (showing the mean and a measure of spread) for each sample and the x-axis representing the sample number/site.\n\nDo not join the means unless intermediate samples would be possible (i.e. don’t join means from samples divided by sex or species but do join those representing temperature, if the intervals between different sample temperatures are even).

(The choice you have here is one that is frequently confused: be careful.)\n\nThe purpose of the test is to look for an association between variables (e.g. is there an association between wing length and thorax length?). You have not set (controlled) one of the variables in the experiment. There is no reason to assume a ‘cause-andeffect’ relationship. This is a test of correlation. [[Go|47]]\n\nOne or more of the variables has been set (controlled or selected) by the experiment or there is a probable ‘cause’ and ‘effect’ or functional relationship between variables. One of the uses of regression statistics you are moving to is prediction (e.g. the experiment is looking at the effect of temperature on heart rate in Daphnia. You are expecting that heart rate is affected by temperature but wish to discover the form of the relationship so that predictions can be made). This is a regression type of test. [[Go|53]]

Data are in the form of frequencies (e.g. number of white flowers and orange flowers). [[Go|48]]\n\nThere is a value for each observation. Variables should be paired etc. (e.g. an observation of two variables, cell count and lung capacity, from one individual). [[Go|50]]

There is only one observation for each combination of factor levels: carry out a three-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]]. You will not be able to calculate the significance of the three-way interaction but you will be able to do this for the interaction between each combination of two factors. (Note that any main factors that prove to be nonsignificant can be left out of the analysis to reduce the complexity of the design.)\n\nThere is more than one observation for each combination of factor levels: carry out a three-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]], interaction terms are possible.

One factor is ‘nested’ within another the third is independent: carry out an [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] involving both hierarchical and crossed factors. This is often difficult to reach in statistics packages although the design is a common one. If you only have one observation for each combination of factor levels then an interaction term cannot be tested (this is because it has to be used as the residual or error term).\n\nOne factor is ‘nested’ within another that is itself ‘nested’ within a third (e.g. in a water pollution survey the variable is nitrate concentration. Several samples have been taken from five streams from each of three river systems and this has been done in two countries. The factors are stream, river and country. Stream is nested within river and river nested within country): carry out a nested or hierarchical [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]].

There are more than 200 observations in the sample: carry out a [[G-test|http://en.wikipedia.org/wiki/Likelihood-ratio_test]], if your package supports it; otherwise use a [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit.\n\nThere are 25–200 observations: carry out a [[G-test|http://en.wikipedia.org/wiki/Likelihood-ratio_test]] if your package supports it; otherwise use a [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit, but add a ‘[[continuity correction|http://en.wikipedia.org/wiki/Continuity_correction]]’ by adding 0.5 to the lower frequencies and subtracting 0.5 from the higher. This is very conservative and may result in a non-significant result when a marginally significant one is present (type I error). If your package supports the ‘Williams’ correction’ then use that instead of the ‘continuity correction’.\n\nThere are fewer than 25 observations: there are four possible solutions (listed in order of preference): use a [[binomial test|http://en.wikipedia.org/wiki/Binomial_test]] if supported by your package; carry one out by hand if you are able; get a bigger sample; pretend you have 25 observations and use the instructions above.

There is only one way of classifying the data (e.g. grouped by species). [[Go|30]]\n\nThere is more than one way of classifying the data (e.g. grouped by species and collection site). [[Go|38]]

The data are likely to be normally distributed within each factor combination (it is impossible to test this when there is only one observation in each factor combination). Data such as lengths and concentrations are likely to be appropriate but judgement is required: carry out a two-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]], but note that you will not be able to look for any interaction between the two factors.\n\nYou are cautious, or have a data set that is unlikely to be normally distributed: carry out a [[Friedman test|http://en.wikipedia.org/wiki/Friedman_test]], although be warned that this test is quite weak.

Factors are fully independent of each other. [[Go|42]]\n\nOne factor is ‘nested’ within another (e.g. if there are three branches sampled from each of three trees then branch is said to be ‘nested’ within trees): carry out a nested [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]], (a.k.a. hierarchical ANOVA). (Note: there is no non-parametric equivalent (i.e. one that makes fewer assumptions about the distribution of the data) of this test.)

Testing a clear hypothesis and associated null hypothesis (e.g. H1 = blood glucose level is related to age and H0 = blood glucose is not related to age). [[Go|25]]\n\nNot testing any hypothesis but simply want to present, summarize or explore data. [[Go|2]]

There is only one collected variable under consideration (e.g. the only variable measured is brain volume although it may have been measured from several different populations). [[Go|4]]\n\nThere is more than one measured variable (e.g. you have measured the number of algae per millilitre and the water pH in the same sample). [[Go|24]]

Methods to summarize and display the data required. [[Go|3]]\n\nData exploration for the purpose of understanding and getting a feel for the data or perhaps to help with formulation of hypotheses. [[Go|60]]\n\nFor example, you may wish to find possible groups within the data (e.g. 10 morphological variables have been taken from a large number of carabid beetles; the multivariate test may establish whether they can be divided into separate taxa).

There is only one group or sample (e.g. all measurements taken from the same river on the same day). [[Go|6]]\n\nThere is more than one group or sample (e.g. you have measured the number of antenna segments in a species of beetle and have divided the sample according to sex to give two groups). [[Go|15]]

The data are discrete; there are fewer than 30 different values (e.g. number of species in a sample). [[Go|5]]\n\nThe data are continuous; there are more than 29 different values (e.g. bee wing length measured to the nearest 0.01 mm). [[Go|16]]\n\n(Note: the distinction between the above is rather arbitrary.)

A display of the whole distribution is required. [[Go|8]]\n\nCrude display of position and spread of data is required: use a box and whisker display to show medians, range and inter-quartile range (also known as a [[box plot|http://en.wikipedia.org/wiki/Box_plot]]).

A graphical representation of the data is required. [[Go|7]]\n\nA numerical summary or description of the data required. [[Go|11]]

There are fewer than 10 different values or classifications: draw a [[pie chart|http://en.wikipedia.org/wiki/Pie_chart]]. Ensure that each segment is labelled clearly and that adjacent shading patterns are as distinct as possible. Avoid using three-dimensional or shadow effects, dark shading or colour. Do not add the proportion in figures to the ‘piece’ of the pie as this information is redundant.\n\nThere are 10 or more different values or classifications: amalgamate values until there are fewer than 10 or divide the sample to produce two sets each with fewer than 10 values. Ten is a level above which it is difficult to distinguish different sections of the pie or to have sufficiently distinct shading patterns.

Choosing and Using Statistics: A Biologist's Guide

Both sets of data are continuous (have more than 30 values) and are approximately normally distributed (a good way to get a feel for this is to produce a [[scatterplot|http://en.wikipedia.org/wiki/Scatter_plot]] which should produce a circle or ellipse of points): carry out a [[Pearson’s product-moment correlation|http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient]] (coefficient is called r). This is the standard correlation method.\n\nData are discrete, or not normally distributed, or you are unsure: use a [[Spearman’s rank-order correlation coefficient|http://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient]], or a [[Kendall rank-order correlation coefficient|http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient]]. The marginal advantage of the former is that it is slightly easier to compare with the Pearson product-moment correlation while the latter can be used in partial correlations.\n\nData are ranked: use a [[Kendall rank-order correlation coefficient|http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient]]. (The [[Spearman’s rank-order correlation coefficient|http://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient]] is marginally inferior in this case.)

The two variables each have two possible values (e.g. yes/no or male/female): calculate a [[phi coefficient|http://en.wikipedia.org/wiki/Phi_coefficient]] for a 2×2 table, if your package supports it or you can do it by hand. This test is a special case of a contingency [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] calculation.\n\nAt least one of the variables has more than two possible values (e.g. a crude land classification, forest/scrub/pasture/arable, is compared to an estimate of the density of a small mammal: common/rare/absent): calculate a contingency [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] , and, if your statistical package supports it, a Cramér coefficient.

There is no replication (i.e. only one value assigned to each combination of the two factor levels) (e.g. the basal trunk diameters after 2 years are collected from four strains of apple tree grown under four watering regimes but with only one tree under each watering condition). [[Go|40]]\n\nThere is replication (i.e. there are two or more values for each combination of the two factors). [[Go|41]]

There are only two factors/ways of classifying the data (e.g. strain and location). [[Go|39]]\n\nThere are three factors/ways of classifying the data (e.g. sex, region and year). [[Go|43]]\n\nThere are more than three factors: use the key as if there are three factors and extrapolate. Multifactorial experimental designs become increasingly difficult to interpret because there are so many possible interactions between factors and it is often easiest to leave out factors that you have proved to have no significant effect. [[Go|43]]

Values have real meaning (e.g. number of mammals caught per night). [[Go|10]]\n\nValues are arbitrary labels that have no real sequence (e.g. different vegetation-type classifications in an area of forest). [[Go|9]]

Your primary aim is to find the ‘cause’ variable(s) that are the best predictors of the ‘effect’ variable: use [[stepwise regression|http://en.wikipedia.org/wiki/Stepwise_regression]].\n\nYou want to establish a model using all available ‘cause’ variables: use [[multiple regression|http://en.wikipedia.org/wiki/Linear_regression]].\n\n(The distinction between these two is rather arbitrary.)

There is one dependent ‘effect’ variable and two or more independent ‘cause’ variables. [[Go|59]]\n\nThere are several ‘cause’ and ‘effect’ variables: use [[path analysis|http://en.wikipedia.org/wiki/Path_analysis_(statistics)]].

You want a measure of position (mean is the one used most commonly). [[Go|12]]\n\nYou want a measure of dispersion or spread (standard deviation and confidence intervals are the most commonly used). [[Go|13]]\n\nYou want a measure of symmetry or shape of the distribution. [[Go|14]]\n\n(Note: you will probably want to go for at least one measure of position and another of spread in most cases.)

There are more than 20 different values: amalgamate values to produce around 12 classes (almost certainly done automatically by your package) and draw a [[histogram|http://en.wikipedia.org/wiki/Histogram]]. Put classes on the x-axis, frequency of occurrence (number of times the value occurs) on the y-axis, with no gaps between bars. Do not use three-dimensional or shadow effects.\n\nThere are 20 or fewer different values: draw a [[bar chart|http://en.wikipedia.org/wiki/Bar_chart]]. Each value should be represented on the x-axis. If there are few classes, extend the range to include values not in the data set at either side, frequency of occurrence (number of times the value occurs) on y-axis. Gaps should appear between bars, unless the variable is clearly supposed to be continuous; do not use three-dimensional or shadow effects.

A very rough measure of spread is required: calculate the [[range|http://en.wikipedia.org/wiki/Range_(statistics)]] (note that this measure is very biased by sample size and is rarely a useful statistic).\n\nYou are particularly interested in the highest and/or lowest values: calculate the [[range|http://en.wikipedia.org/wiki/Range_(statistics)]].\n \nVariable should be continuous but has only a few values due to accuracy of measurement: calculate the [[standard deviation|http://en.wikipedia.org/wiki/Standard_deviation]].\n\nVariable is discrete or has an unusual distribution: calculate the [[interquartile range|http://en.wikipedia.org/wiki/Interquartile_range]].

Variable is definitely discrete, usually restricted to integer values smaller than 30 (e.g. number of eggs in a clutch): calculate the [[median|http://en.wikipedia.org/wiki/Median]].\n\nVariable should be continuous but has only a few different values due to accuracy of measurement (e.g. bone length measured to the nearest centimetre): calculate the [[mean|http://en.wikipedia.org/wiki/Mean]].\n\nIf you are particularly interested in the most commonly occurring response: calculate the [[mode|http://en.wikipedia.org/wiki/Mode_(statistics)]], in addition to either the [[mean|http://en.wikipedia.org/wiki/Mean]] or [[median|http://en.wikipedia.org/wiki/Median]].

You have not established the appropriate technique for a single sample: [[go back|6]] to find the appropriate techniques for each group. You should find that the same is correct for each sample or group. [[Go|6]]\n\nThe samples can be displayed separately: [[go back|7]] and choose the appropriate style. So that direct comparisons can be made, be sure to use the same scales (both x-axis and y-axis) for each graph. Be warned that packages will often adjust scales for you. If this happens you must force the scales to be the same. [[Go|7]]\n\nThe samples are to be displayed together on the same graph: use a chart with a [[box plot|http://en.wikipedia.org/wiki/Box_plot]] for each sample and the x-axis representing the sample number. Ensure that there is a clear space between each box plot.

Variable should be continuous but has only a few values due to accuracy of measurement: calculate the [[skew|http://en.wikipedia.org/wiki/Skewness]] (g1).\n\nObservations are discrete or you have already calculated the [[interquartile range|http://en.wikipedia.org/wiki/Interquartile_range]] and the [[median|http://en.wikipedia.org/wiki/Median]]: the relative size of the interquartile range above and below the median provides a measure of the symmetry of the data.

A graphical representation of the data is required. [[Go|18]]\n\nA numerical summary or descriptive statistics are required. [[Go|19]]

There is only a data set from one group or sample. [[Go|17]]\n\nThe data have been collected from more than one group or sample (e.g. you have measured the mass of each individual of a single species of vole from one sample and have divided the sample according to sex). [[Go|23]]

You want a measure of position (mean is the most common). [[Go|20]]\n\nYou want a measure of dispersion (spread). [[Go|21]]\n\nYou want a measure of symmetry or shape of the distribution. [[Go|22]]\n\nYou wish to determine whether the data are normally distributed: carry out a [[Kolmogorov–Smirnov test|http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test]], an [[Anderson–Darling test|http://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test]], a [[Shapiro–Wilk test|http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test]], or a [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit.\n\n(Note: you probably require one of each of the above for a full summary of the data.)

A display of the whole distribution is required: group to produce around 12–20 classes and draw a [[histogram|http://en.wikipedia.org/wiki/Histogram]] (probably done automatically by your package). Put classes on the x-axis, frequency of occurrence (number of times the value occurs within the class) on the y-axis, with no gaps between bars and no three-dimensional or shadow effects. Even-sized classes are much easier for a reader to interpret. Data with an unusual distribution (e.g. there are some extremely high values well away from most of the observations) may require [[transformation|http://en.wikipedia.org/wiki/Data_transformation_(statistics)]] before the histogram is attempted.\n\nA crude display of position and spread of the data is required: the ‘[[error bar|http://en.wikipedia.org/wiki/Error_bar]]’ type of display is unusual for a single sample but common for several samples. There is a symbol representing the [[mean|http://en.wikipedia.org/wiki/Mean]] and a vertical line representing [[range|http://en.wikipedia.org/wiki/Range_(statistics)]] of either the 95% [[confidence interval|http://en.wikipedia.org/wiki/Confidence_interval]] or the [[standard deviation|http://en.wikipedia.org/wiki/Standard_deviation]].

Two samples are ‘paired’. This means that the same individual, location or quadrat has been measured twice. This is the ‘beforeand-after’ design (e.g. river nitrate level is measured at the same point before and after a storm). [[Go|32]]\n\nTwo samples are independent. There are different groups of individuals in the two samples. [[Go|34]]

There are only two groups (e.g. male and female or before and after). [[Go|31]]\n\nThere are more than two groups (e.g. samples from four different fields). \n(Note: the null hypothesis is that all groups have the same mean so if any two groups have different means you have to reject this null hypothesis.) [[Go|35]]\n\nThere are more than two groups and several measured variables [e.g. individuals divided by species (a grouping variable) and the measured variables are various anatomical characters or dimensions such as leaf length, stem thickness and petal length]: [[canonical variate analysis|http://en.wikipedia.org/wiki/Canonical_analysis]].

The data for each factor level are normally distributed, there are at least 30 possible values and variances are, at least approximately, homogeneous: carry out a one-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] with the one factor having one level for each group. (Note: the [[t-test|http://en.wikipedia.org/wiki/Student%27s_t-test]] can only be used on two groups.) If the result is significant then you need to carry out a post hoc test to determine which factor levels are significantly different from which. If you are cautious, or unsure, use a [[Kruskal–Wallis|http://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_one-way_analysis_of_variance]] test instead.\n\nThe data set does not, or might not, fulfil the conditions above: carry out a [[Kruskal–Wallis|http://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_one-way_analysis_of_variance]] with one factor having a level for each group. (Note: the [[Mann–Whitney U test|http://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test]] only works for two groups so is not appropriate here.)

The data for each factor combination are normally distributed, there are at least 30 possible values and variances are, at least approximately, homogeneous: carry out a two-way, repeated measures [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] with one factor having a different level for each sampling repeat and a second factor having a level for each individual you are sampling (easy if you have only five rivers measured each year but very tedious to input and difficult to interpret if you have 50). Be aware that if your package does not support repeated-measures designs the degrees of freedom in a two-way ANOVA should be reduced to compensate for the design. To test for normal distributions you can use [[Kolmogorov–Smirnov tests|http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test]], [[Anderson–Darling tests|http://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test]], a [[Shapiro–Wilk test|http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test]], or a [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit, although in practice it is usual to use experience to determine whether the data are likely to be normally distributed. Furthermore, ANOVA is quite robust to small departures from a normal distribution.\n\nThe data set does not conform to the restrictions above and you only have one observation for each repeat of each sample: carry out a [[Friedman test|http://en.wikipedia.org/wiki/Friedman_test]] with one factor having a different level for each sampling repeat event, (e.g. before, during, after) and one factor having a different level for each individual (e.g. person) you are sampling.\n\nNeither of the above apply. This is difficult! It often results from poor planning of the experiment: usually it is best to carry out an [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]], as if the data conformed to the assumptions of distribution and variances but to treat the resulting P-values with caution, especially if a P-value is between 0.1 and 0.01.

Samples are ‘repeated measures’. This means that the same individual or location is measured through time. This is an extended ‘before-and-after’ design (e.g. lake turbidity is measured at the same point each year for several years). [[Go|36]]\n\nEach sample is independent. There are different groups of individuals in each samples. [It is important that no individual is present more than once in the data set, otherwise problems (of inappropriate replication) reduce the power of the statistical test.] [[Go|37]]

The data set is normally distributed, there are at least 30 possible values and variances are, at least approximately, homogeneous: carry out a one-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] with one factor having two levels (one for each group), or use a [[t-test|http://en.wikipedia.org/wiki/Student%27s_t-test]].\n\nTo test for normal distribution use [[Kolmogorov–Smirnov tests|http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test]], [[Anderson–Darling tests|http://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test]], a [[Shapiro–Wilk test|http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test]], or [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit. A test for homogeneity of variance is often an option within the [[t-test|http://en.wikipedia.org/wiki/Student%27s_t-test]] of the [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] in the package (e.g. a [[Levene test|http://en.wikipedia.org/wiki/Levene%27s_test]]).\n\nThe traditional method is to use a t-test for this type of experiment but it is no better than ANOVA in this circumstance as both tests give an identical result, although many packages have versions of the t-test that make an adjustment to the degrees of freedom to account for violations of the assumptions of the test.\n\nThe data set does not, or might not, fulfil the conditions above: carry out a [[Mann–Whitney U|http://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test]] test (sometimes called Wilcoxon–Mann–Whitney or Wilcoxon two-sample test; not a Wilcoxon signed ranks test). (The [[Kruskal–Wallis test|http://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_one-way_analysis_of_variance]] is an alternative but is less powerful.)

Data have more than 20 possible values: carry out a [[Wilcoxon signed ranks test|http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test]].\n\nData have 20 or fewer possible values (e.g. questionnaire results with a question of ‘how do you feel’ asked before and after exercise): carry out a [[sign test|http://en.wikipedia.org/wiki/Sign_test]] if supported by your package (this is a very conservative but fairly low-power test). If this is not available in the package carry out a [[Wilcoxon signed ranks test|http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test]].

There is one dependent variable (‘effect’) and one independent variable (‘cause’). [[Go|56]]\n\nThere is one or more dependent variable (‘effect’) and two or more independent variables. [[Go|58]]\n\nThe data for the dependent variable can be classified into more than one group (e.g. by species or sex). There is a variable that may affect the dependent variable: [[analysis of covariance (ANCOVA)|http://en.wikipedia.org/wiki/Analysis_of_covariance]] is required. This is a technique where the confounding variable, known as the covariate, is factored out by the analysis allowing comparison of the groups. Complex designs are possible but the most common is analogous to a one-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] with the data (e.g.dry weight) in classes (e.g. cultivars) and a variable known to be confounding factored out as the covariate (e.g. degree days).

The data are normally distributed, there are at least 30 possible values and variances are, at least approximately, homogeneous: carry out a paired [[t-test|http://en.wikipedia.org/wiki/Student%27s_t-test]]. To test for normal distribution use a [[Kolmogorov–Smirnov test|http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test]], an [[Anderson–Darling test|http://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test]], a [[Shapiro–Wilk test|http://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test]], or a [[chi-square|http://en.wikipedia.org/wiki/Chi-squared_distribution]] goodness of fit. A test for homogeneity of variance is often an option within the t-test in the package (e.g. a [[Levene test|http://en.wikipedia.org/wiki/Levene%27s_test]] or [[Bartlett’s test|http://en.wikipedia.org/wiki/Bartlett%27s_test]]).\n\nA two-way [[ANOVA|http://en.wikipedia.org/wiki/Analysis_of_variance]] test is a potential alternative here but is more difficult to carry out than the paired t-test in most statistical packages (use one factor of the ANOVA to represent ‘before/after’ and the other to represent the different individuals).\n\nAbove does not, or might not, apply. [[Go|33]]

Lee Larcombe - Adapted from Choosing and Using Statistics: A Biologist's Guide. 3rd Ed. Wiley Publishing. Calvin Dytham

(As the theoretical shape of the relationship is often unknown the usual strategy here is to try both methods and see which gives the better fit.)\n\nThe relationship is likely to be a straight line or you are not sure of the form of the relationship: [[linear regression|http://en.wikipedia.org/wiki/Linear_regression]] (a.k.a. model I regression). [Note: in many cases the independent variable can be transformed to straighten the relationship between cause and effect (e.g. if the independent variable is size and is right-skewed then a log transformation will often improve a linear fit).]\n\nThe relationship is curvilinear or complex: [[polynomial regression|http://en.wikipedia.org/wiki/Polynomial_regression]] or quadratic regression (a special case of polynomial regression).

There are two variables. [[Go|51]]\n\nThere are more than two variables. [[Go|52]]