5-chi square analysis tutorial

Upload: alv143

Post on 10-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 5-Chi Square Analysis Tutorial

    1/17

    Chi Square G2 for goodness of fit

    Chi Square TestChi Square TestChi Square TestChi Square Test

    The G2 test is a statistical method that tests whether a given set of data fit ahypothesis.

    Tests the probability of this

    Not that the hypothesis is correct but the probability

    Can the test accept the hypothesis and it s wrong? Can wereject a correct hypothesis? You bet! That s why we call itprobability and not absolutility!

    But in the following pages you will see how statistics can gauge

    the confidence of our answer.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    2/17

    Chi Square G2 for goodness of fit

    Chi Square TestChi Square TestChi Square TestChi Square Test

    To perform the G2 statistical test you must:1. Make a null hypothesis concerning your data

    2. Predict the outcome of the data if your null hypothesis were correct3. Establish the G2 value4. Determine the degrees of freedom for the test5. Determine the probability that your null hypothesis is correct6. Accept or reject your null hypothesis based on the probability7. Draw a conclusion

    These 7 steps will be explained in detail in the following example.

    PS these are the steps I look for and score on any exam

  • 8/8/2019 5-Chi Square Analysis Tutorial

    3/17

    Chi Square G2 for goodness of fit

    99 purple and 45 white flowerstotal = 144

    Are these progeny in a 3:1 ratio representative of a monohybrid cross?

    Chi Square TestChi Square TestChi Square TestChi Square Test

    A 3:1 ratio is indicative of a monohybrid cross:Pp X Pp -> 3 P_ : 1 pp

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 totest this hypothesis.

    So we can write the problem as:

    In the next slides we will outline the G2 analysis for this process

  • 8/8/2019 5-Chi Square Analysis Tutorial

    4/17

    Step 1. State null hypothesis in detail

    Pp X Ppgives

    3 Purple : 1 White

    Would give progeny: P_ & pp in a 3:1 ratio

    Hypothesis: These progeny are in a 3:1 ratiorepresentative of a monohybrid cross

    Chi Square TestChi Square TestChi Square TestChi Square Test

    This is one of the most important steps that students often overlookRemember that if you don t know your hypothesis you don t know what

    you are accepting or rejecting in the end

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2

    to test this hypothesis.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    5/17

    Chi Square TestChi Square TestChi Square TestChi Square Test

    Step 2. Determine rules of probability to predict expected values

    If this is a 3:1 ratio, then we would expect purple and white:

    99 purple + 45 white = 144 total progeny-So, we would expect for the Purple of 144 = 108.-We would expect for the White of 144 = 36.

    -108 purple and 36 white are the expected values

    -The given data are the observed values (ie, in this case 99 purple and 45 white)

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2

    to test this hypothesis.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    6/17

    Step 3. Establish the G2 value

    F irst, determine deviation of actual data from expected:

    Chi Square TestChi Square TestChi Square TestChi Square Test

    108108 -- 99 = 9 purple99 = 9 purple3636 -- 45 =45 = --9 white9 white

    Square the difference:Square the difference:

    Find the difference from the expected:Find the difference from the expected:

    (9)(9) 22 = 81 purple= 81 purple((--9)9) 22 = 81 white= 81 white

    Divide by the expectedDivide by the expected

    81/108 = 0.75 purple81/108 = 0.75 purple81/36 = 2.25 white81/36 = 2.25 white

    F or each class:

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2

    to test this hypothesis.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    7/17

    Step 3. Establish the G2 value

    Total the results for all the classes of progeny

    G2 = 0.75 + 2.25 = 3.0

    Chi Square TestChi Square TestChi Square TestChi Square Test

    If G2 = 0Data fit hypothesis exactly and no difference is seen

    So now that we have a number,So now that we have a number, What does this value mean? What does this value mean?

    GG22 == 77 (observed(observed - - expected)expected) 22expectedexpected

    We can summarize Step 3 by the equation:

    To answer that question we have to remember that GG22 is determined from the deviationsfrom the expected values. Therefore the smaller the number is the smaller the deviationis from the expected values:

    Conversely, the larger the number is the larger the deviation is from the expected values.

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 to test this hypothesis.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    8/17

    Degrees of freedom = # of classes - 1

    F or our example, the degrees of F reedom = 2 (Purple and White) - 1 = 1

    Chi Square TestChi Square TestChi Square TestChi Square Test

    Step 4 Determine the Degrees of Freedom for the test

    The degrees of freedom are the number of independent variablesOne phenotype is not variable with itself and so would have 0 degrees of freedom. Twophenotypes have one variable and therefore would have 1 degree of freedom, etc. Wecan therefore summarize this by saying that:

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 to test this hypothesis.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    9/17

    Step 5. Determine the probability that your null hypothesis is correct

    Chi Square TestChi Square TestChi Square TestChi Square Test

    Up to now we still have not determined the probability that the data fit the hypothesisbut only the sum of how far each individual data point has deviated from the expected.T

    We will take a little detour to demonstrate that probability depends on sample size:

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 to test this hypothesis.

    (for 4 slides after this )

  • 8/8/2019 5-Chi Square Analysis Tutorial

    10/17

    Probability depends on sample size

    Step 5. Determine the probability that your null hypothesis is correct

    Let s look at 3 sample sizes below, 4, 8, and 40. Here we are looking at tall vs. dwarf trees.Now let s look at the predicted distribution of trees having the indicated number of talltrees on the left for each category and the probability for each outcome on the right.Since tall is dominant, it is not surprising to see that the probability is higher for highernumbers of trees to be tall. You will notice though that the larger the number the moreaccurate the prediction of should be tall.

    Let s look at itin pictures

  • 8/8/2019 5-Chi Square Analysis Tutorial

    11/17

    as n gets larger, curve gets smoother

    Step 5. Determine the probability that your null hypothesis is correct

    So when you plot the results of the previous table you see that as you increase thenumber, the curve gets smoother, but there is less change in probability. With 40 treesyou see that you get a bell curve shape. Let s examine the last one in greater detail.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    12/17

    Ratios within 95% limits are supportive of hypothesis

    Step 5. Determine the probability that your null hypothesis is correct

    If we look at the graph, 95%of the area is under the curveand 5% is in the shoulderregions. This 5% is the datathat is most in doubt doprobabilities that fall into thisregion mean that thehypothesis is incorrect? No.Do probabilities that fallunder in the 95% area meanthat the hypothesis is correct?No. But depending uponsample size if we are withinthose 95% confidence limitswe accept the hypothesis.

    How do we know what probability is most likely to be correct?

  • 8/8/2019 5-Chi Square Analysis Tutorial

    13/17

    Chi Square TestChi Square TestChi Square TestChi Square Test

    < 5% chance of being the correct

    hypothesis

    E nd of

    Degrees of freedom (df) are listed in the outer columns

    Probabilities head the interior columnsThe numbers in those columns are G values

    If we go from the graph to the G table below we see columns with probabilities as headings.Within the body of the table are the G values that correspond to the probability at the top.

    Rarely will you find aG that is exact usually it falls between2 columns.

    This means that theprobability is between

    2 numbers as well.

    For example:0.05 < p< 0.1

    This is the correct wayto write probability.

    (bell curve shoulders)

  • 8/8/2019 5-Chi Square Analysis Tutorial

    14/17

    Chi Square TestChi Square TestChi Square TestChi Square Test

    Step 5 Determine the probability that your null hypothesis is correct

    To return to our example, to determine the probability that our data fit the nullhypothesis, we will use both the degrees of freedom that you determined (1) and the Gvalue (3.0) in a G table shown below.

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 to test this hypothesis.

    Find the df lineyou determined

    Locate the 2

    columns thatspan the G valuefrom youranalysis

    G o to the top of

    the column forthe probability (p)

  • 8/8/2019 5-Chi Square Analysis Tutorial

    15/17

    Chi Square TestChi Square TestChi Square TestChi Square TestExample: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 to test this hypothesis.

    Step 5 Determine the probability that your null hypothesis is correct

    Since we have 1 df and our c2 is 3.0 our probability is between 0.1 and 0.05.We would write this as 0.1>p>0.05

  • 8/8/2019 5-Chi Square Analysis Tutorial

    16/17

    Chi Square TestChi Square TestChi Square TestChi Square Test

    Step 7 Draw the conclusion

    Step 6 Accept or reject the null hypothesis based on the probability

    These data for purple and white are indicative of a 3:1 ratio

    The G test can be used to test any type of genetic hypothesis using these 7 steps:Monohybrids, dihybrids, testcrosses, and as we ll see linkage of 2 genes.

    Example: If we observed 99 purple and 45 white flowers, is this a 3:1 ratio? Use G2 to test this hypothesis.

    Since p is above 0.05, we accept the hypothesis.

  • 8/8/2019 5-Chi Square Analysis Tutorial

    17/17

    Here are 2 of Mendel s

    experiments to practice with.You can use the answers tocheck yourself.

    Here you see the same dataassuming a hypothesis of 1;1. Seehow different the outcome is?