I have a MySQL table with three columns: height, weight, gender. This table is being used as a model for my project. Is there a function of method in RoR that will allow me to calculate a normal distribution based on the data?
For example I would like to create a bell curve for men, and a bell curve for women, and then be able to determine the likelihood of any give height/weight value set as being male or female. New data will always be getting added, so the distributions will not be static.
Should I try to create a function in MySQL that creates the distributions, and then have a RoR method that evaluates input against the distribution, or can this all be done in RoR?
I am using Ruby 2.3 and rails 5.1.6.