Presentation is loading. Please wait.

Presentation is loading. Please wait.

Study Guide Biol 260 Lab Exam 2. Table of Contents Lab 10: F-test Lab 11: t-test Lab 12: Chi Square (X 2 ) Lab 13: One-Way ANOVA Lab 15: Two-Way ANOVA.

Similar presentations


Presentation on theme: "Study Guide Biol 260 Lab Exam 2. Table of Contents Lab 10: F-test Lab 11: t-test Lab 12: Chi Square (X 2 ) Lab 13: One-Way ANOVA Lab 15: Two-Way ANOVA."— Presentation transcript:

1 Study Guide Biol 260 Lab Exam 2

2 Table of Contents Lab 10: F-test Lab 11: t-test Lab 12: Chi Square (X 2 ) Lab 13: One-Way ANOVA Lab 15: Two-Way ANOVA Lab 16: Regression/Correlation

3 Lab 10: F-test Sample variance: basic measure of dispersion of the sample and an estimate of the true pop. variance from which the data was taken. Homogeneous: when the variances are equal. F-test: (variance ratio test) general procedure for comparing any two sample variances. Two sample variances: approx. equal and ratio ≈ 1.0 (sample error). Two Tailed Alternative H 0 : σ 2 = σ 2 α = H A : σ 2 ≠ σ 2 One-Tailed Alternative H 0 : σ 2 ≤ σ 2 H A : σ 2 > σ 2 F-table: Two-tailed Alternatives A.Larger s 2 in numerator A.F calc < 1| greater than 1. B.F crit = α/2| upper tail. C.F crit = α/2| lower tail, don’t need. B.Lower F crit value

4 Lab 10: Variance Ratio (F-test) Two-Tailed (non-directional) H A :σ 2 ≠ σ 2 F calc : s 2 larger = numerator. One-Tailed (directional) H A :σ 2 > σ 2 F calc : s 2 1 = numerator (σ 2 1 ). H 0 true: 50:50 chance either variance (s 2 ) is greater. Degrees of Freedom (DOF) v 1 : numerator s 2 DOF. v 2 : denominator s 2 DOF. DOF = n -1. Obtaining Critical F critical A.Choose α value A.Two-tailed = α/2 | upper limit (tail) B.One-tailed = α | upper limit C.Table: p(F) < F critical B.Find the column A.Table top: v 1 (num. s 2 ). B.Table bottom: v 2 (denom. s 2 ). C.F critical = value in body of table. C.F calc vs. F crit A.F calc > F crit = reject H 0. B.F calc < F crit = accept H 0

5 Lab 10: F-test Calculate F critical values (just want p-values) 1.Type data values. 2.“vartest c1 c2;”| runs the F-test. 3.“unstacked.”| runs with unstacked data. F calc > F crit : p < 0.05 F calc 0.05 Untabled Degrees of Freedom (N/A) A.Conservative Critical Values A.Next lower tabled values = decrease the value of one of the variances (numerator or denominator). B.↓ DOF for num/den. = ↑ critical, tabled F value. C.True F critical will be smaller than tabled one. D.F calc < F crit : ↑ num./den. DOF; accept H 0. E.F calc > F crit : reject H 0.

6 Lab 11: t-test or z-test (testing pop. means) Two Sample Experimental Designs 1.Independent samples: (one control) replicates are assigned independently and randomly to treatment groups or drawn independently from two diff pops (different species or different environments). 2.Paired samples: replicates are dependent; each one in a treatment is related to the paired replicate in another treatment (ex: twins assign. two diff diets). T-test Information T-test: compare the equality of two population means. 1.Equal variances: σ 2 = σ 2 t-test or z-test 2.Unequal variances: σ 2 ≠ σ 2 t’-test and paired t-test. Null Hypothesis (H 0 ) (ind. or paired) H 0 : μ 1 = μ 2 H 0 : μ 1 – μ 2 = 0 H 0 : μ 1 – μ 2 = C 0 If equal: difference between two = 0. C 0 : diff. between the two means is a value other than 0. Alternative Hypothesis (H A ) (ind. or paired) One tailed: H A : μ 1 – μ 2 > 0 One-tailed H A : μ 1 – μ 2 < C 0 Two-tailed H A : μ 1 – μ 2 ≠ C 0 C 0 = 0 testing H 0 if means are equal.

7 Lab 11: Independent Sample z-test t-test Pop. Variances Known (σ 2 known) Use z-test (norm. std. distribution). Z calc : from the equation below. Z crit : from table, compare to Z calc. Pop. Variances Unknown (σ 2 unknown) F-test: (pre-test) test if s 2 1 = s 2 2. H 0 : σ 2 = σ 2 H A : σ 2 ≠ σ 2 DOF 1 : n 1 – 1 DOF 2 : n 2 – 1 Correct order of Tests 1.F-test: test H 0 if σ 2 = σ 2. report p-value 2.Accept H 0 : σ 2 = σ 2 Homoscedastic 1.pool sample variances. 2.Calculate t calc. 3.t crit using t-table, DOF = n 1 + n 2 – 2. 3.Reject H 0 : σ 2 ≠ σ 2 Heteroscedastic 1.Calculate t’ calc. 2.Calculate t’ crit. 4.Write hypotheses Two-sample, 1 tailed t-test H 0 : μ 1 ≥ μ 2 H A : μ 1 < μ 2 5.Report p-values, write conclusions.

8 Lab 11: Independent Sample z-test t-test Two-Sample t-test (σ 2 = σ 2 ) σ 2 : aren’t significantly different. s 2 p : pooled within-group variance. Pooling: combing two sep estimates of the pop. Variance (σ 2 ), use s 1 and s 2. SS 1 /SS 2 : sums of squares (num. of s 2 ). DOF = n 1 + n 2 – 2. σ 2 ≠ σ 2 : reject H 0 and incorrect to pool. Incorrect to pool = do not use this eq. Two-Sample t-test, t’-test (σ 2 ≠ σ 2 ) σ 2 : are significantly different. Use: obs. s 2 1 s 2 2, not pooled s 2 p. T’ crit : (n 1 = n 2 ) use t-table, DOF = n -1 Find t’ crit for chosen α with this eq: t 1 = t crit from table, DOF for n 1 – 1. ↓ t’ crit = ↑ DOF T calc betw. t 1 and t 2, find exact t’ crit. T calc > both t 1 and t 2 reject H 0. T calc < both t1 and t 2 accept H 0.

9 Lab 11: Paired t-test and Minitab Paired Two-Sample Two-Tailed t-test Minitab 1.Type data values. 2.“Stat”  “Basic Statistics”  “Paired t…” 3.“Samples in columns” 4.First: c1 5.Second c2 Paired t-test (σ 2 known) Samples called pairs or blocks. Ex: offspring from same parents. Calculate differences within the blocks. Calculate t calc using diff of two samples. Special case of one-sample, H 0 : μ D = 0. New observations: D i = X i,1 – X i,2. n = # of pairs of obs. ( = # of blocks). H 0 : μ D = 0 Directional H A : μ D > 0 Non-directional H A : μ D ≠ 0 Paired t-test (σ 2 known) Paired t-test DOF = n – 1. t calc > t crit : reject H 0 p ≤ α t calc α

10 Lab 11: F-test (pre-test) and t-test Minitab (σ 2 = σ 2 ) F-test (are variances equal?) (unknown σ 2 ) 1.Type data values. 2.“Stat”  “Basic Statistics”  “2 Variance…” 3.“Samples in Different Columns 4.First: c2| larger σ 2 5.Second: c1| smaller σ 2 Independent Two-Sample One-Tailed (σ 2 = σ 2 ) 6.“Stat”  “Basic Statistics”  “2-sample t…” 7.“Samples in different columns” 8.First:c1 9.Second: c2 10.“Assume equal variances” | homoscedastic vs. hetero? 11.“Options”: Confidence level: “95.0” 12. Alternative: “greater than” | H A : μ > μ Alternative: “less than” | H A : μ < μ

11 Lab 12: X 2 Chi Square X 2 (GOF, Independence, and Homogeneity) All X 2 are one-tailed, directional, not-asymmetric, X 2 crit = α = H 0 :O i = E i expected freq. are correctX 2 = smallX 2 ≈ 0.0. H A :O i ≠ E i expected freq. are not correctX 2 = large. X 2 calc ≥ X 2 crit : O i = E i reject H 0 X 2 calc = large. X 2 calc < X 2 crit : O i ≠ E i accept H 0 X 2 calc = small.

12 Lab 12: X 2 Chi Square Goodness of Fit X 2 : Goodness of Fit Samples called pairs or blocks. DOF = k-1-r

13 Lab 12: X 2 Chi Square Goodness of Fit for Minitab GOF, Poisson, Intrinsic 1.“let c3=c1*c2” “sum(c2)” 2.“let k1=sum(c3)/64” “print k1” 3.“pdf c1 c4;” “poisson k1.” 4.“let c5=c4*64” 5.Write in exp./obs. quadrats. 6.“let c9=(c7-c8)**2” “let c10=c9/c8” “sum c10” GOF, Any Ratio, Extrinsic 1.“let c3=c1*c2” “let c4=c3/c2” “sum c4”

14 Lab 12: X 2 Chi Square Independence X 2 Independence Individuals are selected at random and classified on the basis of 2 separate traits. Relates 2 traits to each other (eye color and visual acuity), does 1 depend on other? Whether traits occur independently in the sample or non-independence in sample? Independent: the prop. of people brown, black, or red hair ≈ each eye color. Not independent: prop. of people with different eye color ≠ (diff) hair color. DOF = (r – 1) (c – 1)r = row c = column * * X 2 Independence or Homogeneity Minitab 1.“stat”  “tables”  “Chi-square test (Two-way table in worksheet)…” 2.Columns containing the table: “c1-c4”

15 Lab 12: X 2 Chi Square Homogeneity X 2 Homogeneity Individuals from each of several pops. are selected at random and classified at some single trait with 2 or more categories. Sample the same pop. at diff. times and want to know if the proportions of diff. types remain the same (are homogenous) or if the prop. of different types differ. To see if a trait differs within two samples ( Independent: the frequencies do not differ between the groups (homogenous). Not independent: frequencies do differ between the groups (not homogenous).

16 Lab 12: X 2 Chi Square Homogeneity 1.Define what type of Chi Square it is. Define that it is a Chi-Square. Homogeneity, independence, Goodness of Fit (Poisson, medallion genetics)? 2.Write hypotheses H 0 : visual acuity and eye color are independent of one another. H A : visual acuity and eye color are not independent of one another. 3.Expected Proportion for Each “Trait” and Sum Columns/Rows

17 Lab 12: X 2 Chi Square Homogeneity 3.Expected Frequency for each Trait 4.Obtain a summed Chi Square Value (X 2 total ) = X 2 calc On the next slide. 5.What is your X 2 crit value? X 2 crit = X2crit a = 0.05, df = (r-1)(c-1). 6.What is your p-value? Obtained in Minitab. 7.Write conclusions: Accept/Reject H 0 ? How does this relate to above question? Accept H 0 : there’s no diff. b/e sexes in distance fish moved (homogenous).

18 Lab 12: X 2 Chi Square Homogeneity 4.Obtain a summed Chi Square Value (X 2 total ) = X 2 calc

19 Transform Data Levene’s test  variances not equal  transform  log of data  Levene’s test again  variances equal  run ANOVA with transformed data.

20 Lab 13: One-Way ANOVA One-Way ANOVA ANOVA: (analysis of variance) analyzing the variances to compare the equality of more than two populations means. ANOVA Hypotheses Conceptual Hypothesis (two-tailed) H 0 : μ 1 = μ 2 = μ 3 = … = μ k. H A : not all μ’s are equal. Practical Hypothesis (one-tailed) H 0 : σ 2 groups ≤ σ 2 within H A : σ 2 groups > σ 2 within σ 2 groups = σ 2 among ↓ MSA = μ do not differ. ↑ MSA = μ do differ. Sum of Squares SSA: (sum of squares among) estimate of variance from dispersion of sample means for each group around the grand mean of all observations. SSW: (sum of squares within) (SSE = error) estimate of variance from dispersion of observations within each of the groups around their separate means. SST: (sum of squares total) total sum of squared deviations of observations from the grand mean of all the data.

21 Lab 13: One-Way ANOVA F-test Hypothesis (one-tailed) H 0 : σ 2 A ≤ σ 2 W | do ANOVA H A : σ 2 A > σ 2 W | no ANOVA F calc MSA always in numerator. MSW always in denominator F critical F critical = F k-1, N-k MSA DOF = k – 1. MSW DOF = N – k. Interpretation F calc > F crit : reject ANOVA H 0. F calc < F crit : accept ANOVA H 0. Sum of Squares H 0 true: (σ 2 = σ 2 ) MSA ≈ MSW. H 0 false: (σ 2 ≠ σ 2 ) MSA > MSW Hartley’s F max Test Requires n = n in all groups. F max F critical Top number: α = 0.05 Bottom number: α = 0.01 Columns = k (total # of group variance) Rows = df = n-1 = of the group variances. Reject H 0 : perform transformation of data to equalize the variances. Bartlett’s and Levene’s test in Minitab just use the p-value. Binomial Poisson

22 Lab 13: One-Way ANOVA Minitab A.Write Hypotheses for F-test (σ 2 = σ 2 ) H 0 : σ 2 w = σ 2 W = σ 2 W | do ANOVA H A : at least 2σ 2 are not equal| no ANOVA B.Write Conceptual Hypotheses (two-tailed) H 0 : μ 1 = μ 2 = μ 3 = … = μ k. H A : not all μ’s are equal. C.Write Practical Hypotheses (one-tailed) H 0 : σ 2 groups ≤ σ 2 within H A : σ 2 groups > σ 2 within σ 2 groups = σ 2 among F.Report p-values, write conclusions from ANOVA. P σ 2 within not all μ’s are equal do comparisons. G.Comparisons (Tukey and Interval Plot) (μ’s ≠ μ’s) Do comparisons when means aren’t equal. Qcrit α, k, vk = # of groups v = df of MS w/win α = 0.05 No overlap: means are different (μ’s differ).overlap 0 (zero) Overlap: means not different (μ’s don’t differ).overlap 0 (zero)

23 Lab 13: One-Way ANOVA Minitab D.Run Levene’s F-test (report p-value, transform data or not?) 1.Type data values. 2.Data  Stack  Columns… 3.Stack the following columns: c1-c3| highlight columns and push “select”. 4.Columns in current worksheet: c6| stack data in this column. Label c6 5.Store subscripts in: c7| column for subscripts. Label c7 6.Stat  ANOVA  Test of Equal Variances… 7.Response: c6| where stacked data located. 8.Factors: c7| where subscripts located. 9.Confidence level: 95.0| do transformations or not? E.Run One-Way ANOVA “Stacked Data” 1.Data  stack  Columns... 2.Stack the following columns:c1-c4| list of columns containing data. 3.Column of current worksheet:c6| where you want stacked data stored. 4.Store subscripts in:c7| where you want subscripts stored. 5.Stat  ANOVA  One-Way… 6.Response: c6| column containing stacked data. 7.Factor:c7| column containing subscripts. p-value = 0.000, then p < 0.001

24 Lab 13: One-Way ANOVA Minitab H.Interval Plot (1 st way) (Graphed comparison interval) 1.Type data values. | should already be done at this point. 2.Stat  ANOVA  Interval Plot…| or Data  Graph  Interval Plot… 3.“One Y” “With Groups” | select this graph type. 4.Graph Variables:c6| column containing data. 5.Categorical variables grouping: c7| column containing stacked data. 6.Double-click on the error bars. | new window “Edit Interval Bar” opens. 7.Click the “Options tab” 8.Type of error: “Standard Error” | type in standard error for data set. 9.Multiple:| ½ Q crit 10.Select: “pool error across groups”| this shifts the graph. I.Tukey’s Comparison (2 nd way) 1.Stack data values| should have already done in ANOVA. 2.Stat  ANOVA  One-Way…| performs one-way ANOVA. 3.Response: c6| column containing data. 4.Factor:c7| column containing stacked data. 5.Select “Comparisons” button in ANOVA 6.Tukey’s, family error rate: 5| desired α level.

25 Lab 15: Two-Factor ANOVA p-value = 0.000, then p < Error = within.

26 Lab 15: Two-Factor ANOVA Step 1: Pretest Hypotheses H 0 : σ 2 A = σ 2 B = σ 2 C = σ 2 D = σ 2 E = σ 2 F = σ 2 G = σ 2 H. (within σ 2 ). H A : at least 2σ 2 w/in groups are not equal. Step 2: type data values in Minitab, label c6, c7, c8 Site 1 = 1Site 2 = 2 1.Type the data values in Minitab.| unstacked data, columns Data  Stack  Columns…| will stack the data. 3.Stacking the following columns: c1-c4| these columns will be stacked. 4.Column of current worksheet:c6| stacked data in this column. 5.Store subscripts in:c7| Factor A: subscripts this colmn. 6.Use variable names in subscript column| Allows #’s as subscripts. 7.Calc  Make Patterned Data  Simple Set of Numbers… 8.Store patterned data in: c8| Factor B: subscripts this colmn. 9.From first value:1| small Factor B value. 10.To last value:2| large Factor B value. 11.In steps of: 1| difference of two (2 – 1 = 1). 12.List each value5| # of obs./data values in 1 cell. 13.List the whole sequence:4| diff types Factor A (# of col).

27 Lab 15: Two-Factor ANOVA Step 3: Run Levene’s Test (p-value) 1.Stat  ANOVA  Test for Equal Variances… 2.Response: c6| contains stacked data. 3.Factors:c7 c8| contains subscripts. p-value: 0.297, accept H 0, σ 2 w/in groups = σ 2 w/in groups, no transformations. Step 4: ANOVA Hypotheses (2 way = conceptual only) H1: H 0 : μ none = μ fert = μ irrig = μ fert x irrig | Factor A H A : not all μ’s are equal. H2: H 0 : μ site1 = μ site2 | Factor B H A : not all μ’s are equal. H3: H 0 : no interaction exists between treatment and site on the mean weight of Poplar trees (independent). H A : interactions exist between treatment and site on the mean weight of Poplar trees (dependent). Step 5: run ANOVA, report p-values, write Conclusions H1: p < 0.001, reject H 0, not all μ’s are equal. H2: p < 0.001, reject H 0, not all μ’s are equal. H3: p < 0.001, reject H 0, interactions exist b/e treatment & sites on mean weights.

28 Lab 15: Two-Factor ANOVA Step 5: run ANOVA, report p-values, write Conclusions 1.Stat  ANOVA  General Linear Model | run two-factor ANOVA. 2.Response: c6| stacked data. 3.Model: c7 c8 c7*c8| two factors and the interaction Step 6: run Interaction Plot (only if you reject H3 H 0 ) p-value < 0.001, reject H3 H 0, so do interaction plot. 1.Stat  ANOVA  Interaction Plots…| Interaction Plot. 2.Responses:c6| stacked data. 3.Factors: c7 c8| contains subscripts. 4.Display full interaction plot matrix| select this.

29 Lab 15: Two-Factor ANOVA Interaction Plot on Left Site 1: overall site 1 had higher weights within the individual treatment groups. Site 2: overall site 2 had the lower weights within the individual treatment groups. Interaction Plot on Right All 4 Treatments: with all 4 treatments (none, fertilizer, irrigation, f x i) as you go from site 1 to site 2, there’s a decrease in the weights of the trees in one year. None: weights of site 1, no treatment are higher than the weights in site 2 without treatment; and the weights are lower compared to the rest of the treatments. Fertilizer: weights in site 1 are higher than the weights in site 2 when fertilizer was added; the weights are lower than irrig and fert/irrig but higher than no treatment. Irrigation: weights in site 1 are higher than the weights in site 2 when fertilizer was added; the weights are ↓ than fert/irrig but higher than fertilizer & no treatment. Fert. x Irrig: weights in site 1 are higher than weights in site 2 when fert/irrigation were added; all other weights are lower when given other treatments. In general: suggests that the weights of the Poplar trees tend to be highest, whether in site 1 or site 2, if they are treated with both fertilizer and irrigation; treatment site 1 had the highest weights within treatments and overall treatments.

30 Lab 16: Regression Step 1: Plot your data, is it linear? Create scatter plot. 1.Graph  scatterplot  simple  2.Y variable: c2 X variable: c1 Copy and paste graph into a document, state “looks linear” Step 2: Report Null and Alternative H 0 : β = 0.no significant linear relationship between _____ & _____ H A : β ≠ 0.there is significant linear relationship between _____ & _____ Step 3: run one-way ANOVA or one-sample t-test 1.Stat  regression  Regression 2.Response: c1| col dependent variable (Y) 3.Predictors: c2 | col. Independent variable (X) 4.Storage: Residuals, fits Step 4: Report equation, report R 2 (in Minitab  R-Sq) y = (°C)R 2 = 95.2% of heart beats that can be explained by reg. line. Dependent and independent Variable X = independent variable = doesn’t change (temp, age, pH) Y = dependent variable = change in relation to X (breeding changes rel. to temp).

31 Lab 16: Regression Step 5: Graph equation (w/ CI) fitted line plot 1.Stat  Regression  Fitted line plot… 2.Response Y: c2| dependent variable. 3.Response X:c1| independent variable. 4.Select Options tabOptions 5.Selectdisplay confidence interval, display prediction interval Step 6: Graph residuals, plot, and do interpretation (paragraph). 1.Stat  regression  Regression 2.Response: c1| col dependent variable (Y) 3.Predictors: c2 | col. Independent variable (X) 4.SelectGraph 5.Residuals vs. variablec1| col independent variable (X) Reasons why t-test more flexible than ANOVA 1.Alternative hypothesis can be one-tailed or two-tailed. 2.β = doesn’t have to be zero, can be another number, can test various H 0 ’s.

32 Lab 16: Correlation Step 1: Report Null and Alternative H 0 : ρ = 0 no correlationρ = population correlation coefficient. H A : ρ ≠ 0 correlationr = sample correlation coefficient. Step 2: Report p-value and interpretation. 1.Stat  Basic statistics  Correlation… 2.Variables: c1 c2| enter the variables Y 1 and Y 2. Report the p-value and what the p-value means. H 0 : r = 0 no correlation exists between 2 variables. H A : r ≈ +1 implies strong positive association b/e ____ & ____ (↑ X  ↑ Y). H A : r ≈ -1 implies strong negative association b/e ____ & ____ (↑ X  ↓ Y). Step 3: Report r-value and interpretation 1.Pearson's correlation = r-value = Strong positive association between heart beat and temp in frogs (r = 0.976). Step 4: Basic scatterplot of values Use from Regression. Finding values out of data or in data In our example we cant find values for ex. = 28 because it is our of the range of values that we have, so type “unable to do so.”


Download ppt "Study Guide Biol 260 Lab Exam 2. Table of Contents Lab 10: F-test Lab 11: t-test Lab 12: Chi Square (X 2 ) Lab 13: One-Way ANOVA Lab 15: Two-Way ANOVA."

Similar presentations


Ads by Google