Statistics Workshop Variable types ttest regression Variables Independent
Statistics Workshop Variable types, t-test & regression
Variables • Independent / Dependent AKA • Explanatory / Response • Continuous / Categorical
Variable types (1) • Independent (explanatory) variable: the “cause” in cause-and-effect. The value is independent of other variables • Dependent (response) variable: the “effect” in cause-and-effect. The value depends on the value of another variable • Examples: -temperature and precipitation type -depth of wheel tread and skidding distance -body size and nutrition quality -bird tail color and mating frequency
Variable types (2) • Continuous: something you measure or count; a range of values (e. g. bean length, number of leaves) • Categorical: something you assign to a discrete group (no overlap, e. g. bean type, leaf color) • Examples: • inches of rainfall • wind speed • precipitation type • dog breeds
Analyzing Data What type of data do you have? Independent Categorical Continuous Dependent Continuous Categorical
Analyzing Data What type of data do you have? Categorical Continuous Dependent Independent Continuous Categorical Regression t-test
Forming hypotheses: Depth of wheel tread and skidding distance Deeper treads make you skid less Dependent - Tread Depth - Skid distance Independent
Forming hypotheses: Depth of wheel tread and skidding distance Skidding wears down tire tread Dependent - Skid Distance - Tread Depth Independent
Testing your hypotheses: Depth of wheel tread and skidding distance Independent • Deeper treads make you skid less Dependent skid distance (m) 9 8 7 6 5 4 3 0 2 4 6 tread depth (mm) 8 10 Categorical Continuous 10 Continuous Regression Categorical
Regression • Quantifies the relationship between the variables • Deeper treads make • Tests your data against a null hypothesis you skid less • Null hypothesis: what you expect if there was no relationship between the variables 10 skid distance (m) 9 8 7 • Null hypothesis: slope = 0 6 • Is the slope significantly different from zero? 5 4 3 0 2 4 6 tread depth (mm) 8 10 • p = 0. 03: 3% chance that the relationship isn’t real, but random sampling produced this result
Forming hypotheses: Bird tail color (red vs. blue) and mating frequency Birds with red tails mate more often Dependent - Tail color - Mating frequency Independent
Forming hypotheses: Bird tail color (red vs. blue) and mating frequency Independent Categorical 25 t-test # of matings in single spring Categorical Continuous Dependent Continuous • Birds with red tails mate more often 20 15 10 5 0 red tail blue tail Male bird tail color
t-test • Compares two categories • Do red-tailed birds or bluetailed birds get more matings? • Are the means different from each other? Number of matings in single spring • Calculate the mean of each group 25 20 15 10 5 0 red tail Male bird tail color blue tail
t-test • Null hypothesis: what you expect if category doesn’t have an affect (tail color doesn’t affect mating success) • p = 0. 18, 18% chance the difference isn’t real, but produced by random sampling p= 0. 18 25 Number of matings in single spring • Null hypothesis: no difference between the means Birds with red tails have more matings 20 15 10 5 0 red tail Male bird tail color blue tail
Testing hypotheses Deeper treads make you skid less Birds with red tails get more mating chances 25 p = 0. 03 p = 0. 18 Number of matings in single spring 10 9 skid distance (m) 8 7 6 5 20 15 10 5 4 0 3 0 2 4 6 tread depth (mm) 8 Regression 10 red tail Male bird tail color t-test blue tail
0. 05 cut-off for statistical significance • If p < 0. 05, we can say that our results are “statistically significant” • Otherwise, the probability of our results being not due to random chance is too large and our results are NOT “statistically significant”
Case studies 1) What are the variables? Are they categorical or continuous? 2) Form a hypothesis about how the variables could be related (which is dependent, which is independent, why? ). 3) Draw a graph of your predicted results. 4) Would you use a t-test or regression to test this? Continuous Dependent Independent Continuous Categorical Regressio n t-test
Climate scientists have noticed that the polar ice caps are melting more in the summers and refreezing less in the winters. There also indications that extreme weather events (tornadoes, heat waves) are becoming more common.
Productivity is one of the most important metrics in agriculture – how much of something can you grow on a piece of land? Ecologists are interested in whether diversity impacts productivity. Some agricultural innovators are interested in trying to grow multiple kinds of crops together. How might these ideas influence each other?
As you climb a mountain, the plants get shorter and shorter. Scientists interested in whether this was due to genetics or environment have taken plants from high and low elevation and grown them together in each environment.
Evolutionary biologists predict that an individual is more likely to give another costly help (altruism) the more closely related they are. Ornithologists have tested this by putting baby birds in nests with siblings or unrelated nestlings and measuring how loudly they call (louder nestlings are more likely to be fed than their neighbors).
A single unlucky moose may host over 100, 000 moose ticks. They rub their fur off in an effort to get rid of ticks. How would you test whether the amount of fur left on a moose is a predictor of their tick load?
Many critters living in the water are eaten by both fish and insects. Fish predators are often gape– limited (they can only eat something up to a certain size). What do you think you would find if you compared growth rates in prey from ponds with and without fish?
extra slides
Analyzing Data What type of data do you have? Categorical Continuous Dependent Independent Continuous Categorical Regressio n t-test
Forming hypotheses: Depth of wheel tread and skidding distance 1) Deeper treads make you skid less 10 9 skid distance (m) 8 7 6 5 4 3 0 2 4 6 tread depth (mm) 8 10 2) More skidding makes your treads shallower
Forming hypotheses: Depth of wheel tread and skidding distance 1) Deeper treads make you skid less 2) More skidding makes your treads shallower 10 10 9 9 8 7 tread depth (mm) skid distance (m) 8 7 6 6 5 4 3 5 2 4 1 3 0 0 2 4 6 tread depth (mm) 8 10 3 4 5 6 7 skid distance (mm) 8 9 10
- Slides: 27