Paternity probability calculator based on blood group and eye color I am currently writing a paternity probability calculator. I am struggling with finding the correct statistical approach to determining probability based on blood type and on eye colour.
For example, assume the following family:
                  Blood Type     Eye Colour
Alleged Father    A              Blue
Mother            AB             Blue
Child             A              Green

A father of type A and a mother of type B can produce the following blood types for their child:
Child's possible blood types    Occurrence
A                               50%
B                               25%
AB                              25%
O                               0%

A father of eye colour Blue and a mother of eye colour Blue can produce a child of the following eye colours:
Child's possible eye colours    Occurrence
Brown                           0%
Blue                            90%
Green                           10%

I would like to provide the probability of paternity for the alleged father given this data. I am struggling with the following:


*

*If the father is of blood type A and the mother is B, then knowing that the child is A should increase our confidence in the paternity of the father - Because we eliminated the less likely results (e.g. O) from the equation.

*Should I start the calculation at a "pseudo-random" value (say 50%), then multiply this value using a confidence factor derived from the occurrence percentage?

*How to derive the confidence factor from the occurrence percentage? In this case, even though the occurrence of blood type A is 50%, it seams that I should multiply the pseudo-random value by a factor above 1. If the blood type of the child would be B instead, it also seems that the factor should be above 1, but less than blood type A would be. If the child's blood type would be O, the multiplication factor should be zero.
 A: Your question is an excellent example of a situation where conditional probability can be applied. Conditional probability is a way of calculating an 'updated' probability given a certain condition. In your question you want to improve the probability given certain information; in math we write $P(A|B)$, which is the probability of $A$ happening (in your case, the alleged father being being the real one) given certain information $B$ (eg, blood type). So, basically, we start with a "base" value and improve it with the given knowledge, kind of like what you were describing in 2 and 3.
To determine $P(A|B)$, we use Bayes' formula:
$$P(A|B) = \frac{P(B|A)P(A)}{P(B)}$$
Where $P(B|A)$ is the probability of B (the baby having the trait) given A (the man is the father), $P(A)$ is the initial 'guess' of the probability of the man being the father, and $P(B)$ is the general probability of a random person having that trait.
$P(B|A)$ is easy enough to determine; you know the child's eye color/blood type; so the second/third tables in your question give the probability of a child having that trait given the father's color/type. $P(A)$ is your initial guess of the person being the father; I would use $\frac12 = 0.5$ for 2 partners, $\frac13 = 0.33...$ for 3 partners and so on (although I hope it doesn't get more than that!) That would require knowledge of how many people are under consideration in being the father, which shouldn't be too hard to get from the user. Finally, $P(B)$ is the probability of any random child having this trait (eg, what percentage of the population has brown eyes, or what percentage is blood type O...) These stats shouldn't be too hard to find on the web or in a text.  
Now, the only problem is that you have 2 given traits to improve the probability. You could consider each alone and then take their average (while returning 0 if either is impossible), or you could use a generalized version of Bayes' theorem to three events. Its statement is likely to be much messier, though, and also might include probabilities you can't easily compute. On the upside, it will be more accurate to a certain degree.
Cheers!
A: This is a very interesting question. The use of conditional probability and Bayes formula might be an interesting approach, but is potentially flawed by the need of an "initial guess" of the person being the father, which may be difficult to establish and which goes out of exact heritability rules, adding a potential bias.
I would suggest an alternative approach that strictly remains under the mendelian rules of heritability. First, remind that for any analysis of this kind it is necessary to know whether subjects with $A$ or $B$ types are homozygous or heterozygous, since the probabilities for the child change. $A$ and $B$ alleles follow a codominant heritability pattern. We must take into account, for instance, whether a subject with $A$ blood type has a $A0$ or $AA$ profile, and so on.
Second, it is necessary to clarify the exact probability that we are looking for. If, for example, the aim of your calculator is to determine the probability that a mother and a potential father with given characteristics could generate a child with other given characteristics, the solution is straightforward. It is sufficient to calculate the probability of each characteristic for the child, and then (assuming full independence) to multiply them. 
On the other hand, the correct approach for a paternity test should follow the inverse path: i.e. to calculate the probability that the father has given characteristics starting from the certain data of the mother's and child's characteristics. This analysis is more complex because it is strictly influenced by the prevalence of those characteristics in men. In our example, heritability codominance rules allow to exactly calculate that a child with an $A$ blood type (e.g. heterozygous) and a mother with AB type have, according to mendelian rules, an occurrence probability of $100\%$ if the father has homozygous type $A$, $75\%$ if he has heterozygous type $A$, $50\%$ if he is $0$ or $AB$, $25\%$ if he has heterozygous type $B$, and $0\%$ if he has homozygous type $A$. Knowing, for instance, that a potential father has heterozygous blood type $A$, and assuming that each type has the same prevalence in men (considering homozygous and heterozygous as different types), we could theoretically infer that the probability that the true father is an heterozygous $A$ is $\frac{0.75}{(1+0.75+2 \cdot 0.50+0.25)}=25\%$. However, this is not true in practice, because the prevalences of blood types in men are not equal. Thus, to get a more realistic estimate, the calculator should compute the resulting probability by weighting each probability according to the corresponding prevalence. Note that the worldwide blood type prevalences in men are well known, and you can get them from a simple search on scientific publications on this topic. I would also suggest to consider population-specific estimates of prevalences. Note that these calculations do not require any initial guess, since they are directly based on genetic rules and established prevalence values.
Third, remind that when using different biological characteristics in genetic studies, the independence of traits is often not satisfied (i.e., the resulting intersection probability is not the product of single probabilities). This is another major issue for the reliability of paternity probability calculations based on multi-trait analysis.
A: If a mother/Father/offspring combination is not in this list, it is clear that the father candidate is not the biological father. If not he may be. That isn't a paternity test, but it would greatly reduce the need for confirmation in populations where there was much variation in blood types.
Here are the 32 possible combinations.
Mother 
     FatherCandidate
            Possible offspring
A   A    A
A   A    O     
A   B     AB
A   B    A
A  B    B
A  B    O
A   AB   A
A   AB   AB
A  AB    B
A   O    A
A  O     O   
B  A    AB
B  A    A
B  A   B
B A   O
B  B   B
B  B   O
B  AB AB
B  AB  B
B AB  A
B  O     B
B  O     O
AB A   A
AB A   AB
AB A  B
O A   A
O A   O
O B    B
O B     O
O AB  A
O AB B
O  O  O
