Member-only story
As I have been studying statistics, I have been endeavouring to convert all of the statistical formulas that I have been studying to the Python programming language so they can be used in development. Of course there are libraries in Python, such as statistics, as well as statsmodels, but I think it is a good idea to be able to write functions for these formulas to attain a better understanding of statistics in general as well as Python programming.
One formula that I have been studying is the t_score. A t_score is the equivalent to the number of standard deviations away from the mean of the t_distribution. It is the test statistic used in t_tests and regression tests. It can also be used to describe how far from the mean an observation when the data follow a t_distribution.
I spent a lot of time studying the t_score and finally found that if the z_score is known, it can be converted to its corresponding t_score. The formula used to convert the z_score to its corresponding t_score can be found below:-
In a previous post I had written a function to find the z_score, and that post can be found here…