Written By Dave Martin
  • 2/11/2021
  • Read Time : 3 min.

Predict Your Cat’s Coat Color with Mathcad

Cat with keyboard.

At the beginning of the pandemic, my friend Kat rehomed a beautiful kitten named Princess Leia.

Rescue cat Leia rests in a sink.

Before Leia could get spayed, Kat realized that Leia was pregnant. Weeks later, Leia gave birth to a boy with a solid black coat. Kat asked for name suggestions and of course I responded with Kylo Ren.

Leia with her kitten, Kylo.

While nursing, Leia escaped once and came back pregnant again.* Around Labor Day, Leia gave birth to four girls and two boys. Some had white socks and splashes of white on their chests and faces. But the primary coat color once again was black.

Leia's second litter.

The names this time were Storm, Scarlett, Batwoman, Sylvain, Chadwick, and Special Agent Jack Bauer (just like Dennis’s junkyard cat from “It’s Always Sunny in Philadelphia”).

The coat color consistency prompted me to investigate cat genetics. Could PTC Mathcad help me deduce the nature of the Han Solos?

I found information on Catster.com regarding the seven genes that control cat coat color. For Leia’s children, I will look at the effects of two of the genes: B for the black color and S for the white spots.

The B Gene

The dominant B gene results in a cat with a black coat. Since Leia is a white-mitted chocolate ragdoll, her basic color is white, which means that she has the recessive bb genes. Han 1 and Han 2 had to be either BB or Bb. If they were BB, the offspring would definitely have black coats. If Han 1 were Bb, there would be a 50% chance that Kylo would have a black coat.
PTC Mathcad contains functions for probability density and probability distribution that enable is to examine Mendelian genetics using the binomial distributions. We find that based on the second litter, the chances are less than 1 in 4,000 that Han 2 was Bb.

The S Gene

The dominant S gene results in white spotting. These kitties had white spots:

  • Batwoman has a white spot on her chest in the form of the Bat symbol.
  • Sylvain is a tuxedo cat with the same coloring as the cartoon cat Sylvester. (Her name is the female form of Sylvester.)
  • Scarlet had a white stripe on her chin that looked like a scar.


Leia has white mittens. If she were SS, all her kittens would have white spots. Since Kylo has no white spots, we can deduce that (1) Leia is Ss and (2) Han 1 was either SS or ss. If the former, there would be only a 25% chance that Kylo would be spotless; in the case of the latter, 75%.

Since 3 of 6 in the second litter had white spots, Han 2 could once again be SS or Ss. We can use the above probabilities to examine the probability distributions and cumulative probabilities in Mathcad:

Using probability density and probability distribution in Mathcad.

These results certainly are interesting. Intuitively, if you see 3 out of 6, you would think that’s 50%. Interestingly, we see that the probability density of having 3 out of 6 is the same if Han 2 is Ss or ss. But given the cumulative distribution, since only 3 out of 6 were spotted, it is significantly more likely that Han 2 is recessive for having spots.

Leia with her progeny.


Genetics is the study of binomial distributions – combinations, permutations, and statistics. I am going to mix Star Wars with Star Trek: the Vulcans have a philosophy called IDIC, which stands for infinite diversity in infinite combinations. As Spock’s clone said, “Symbolizing the elements that create truth and beauty.” If you are like me, you think cats are beautiful creatures. Mathcad helps us explore the truth behind that beauty.

I would be remiss without including a picture of my beautiful cats:

Dave's cats.

If you want to explore the statistics and probability functions for yourself, download Mathcad Express for free.

*NOTE: All cats featured in this story are now neutered/spayed.

Try Mathcad Today

Perform, analyze, document, and share your calculations starting now


About the Author

Dave Martin is a former Creo, Windchill, and Mathcad instructor and consultant. After leaving PTC, he was the Creo specialist for Amazon; and a mechanical engineer, Creo administrator, and Windchill administrator for Amazon Prime Air. He holds a degree in Mechanical Engineering from MIT and currently works as an avionics engineer for Blue Origin. 

Martin is the author of the books Design Intent in Creo Parametric and Top Down Design in Creo Parametric--both available at www.amazon.com. He can be reached at dmartin@creowindchill.com.

Predict Your Cat’s Coat Color with Mathcad
PTC Mathcad contains functions for probability density and probability distribution that enable you to examine Mendelian genetics.