In the dark ages, we would map the results of a Student's t-test to a null hypothesis probability p by looking up T and degrees of freedom in a table to get an approximate result.
What is the mathematical algorithm that generates that table? ie, how can I write a function to generate a precise p given an arbitrary T and df?
The reason I ask is that I'm writing a piece of embedded software that continually monitors hundreds of populations with hundreds of samples each, and raises an alert if successive snapshots of a given population come to differ significantly. Currently it uses a crude z-score comparison, but it would be nice to use a more valid test.