I need help in understanding what pieces of Python code are doing.
I need someone who understands Python and has a background in statistics to write a detailed explanation for me. The person will need to detail the formulas in use, the inputs, the outputs, and explain the logic step by step in a MS Word document.
I have attached the code. I have also attached a copy of my understanding so far.