I am new to data science but here is my thought on the subject of probability. I have worked in the field of construction for a long time, so is it possible that that construction companies use probability to make decisions as what type of materials to use to build certain type of buildings in certain areas? I believe weather, environment, social activities and others might significantly contribute to the decisions.
Now Microsoft is working with NFL to collect data and sharing probability of different outcomes, be it win probability or tight angle catch possibility. On the other hand, data science is opening up quite big opportunities for health care; by analyzing the symptoms, patient data and historical records, IBM Watson can predict the diagnosis and possible treatment.
Probability of Default in finance to predict if a company would go default in paying its debt.
In various engineering fields, probability plays an important role in the design process in the form of risk analysis and evaluation, with the risk being a function of the probability that an event takes place, and the hazard that the event represents.
Based on my understanding the calculation is actually determining the percentage of people who would have unique birthdays and then reverses it ( 1 - percentage of unique birthdays). Let’s say you have 3 people. In the for loop, the first iteration would multiply 365 * 364. The first person can have any birthday in the year so 365 are available. The second person represented by the 364 can have any birthday except the birthday of the first person so only 364 are available now. The next iteration would take that first solution multiplies it by the number of birthdays available to the next person, which would be 363.
The denominator represents the total number of combinations, including the people with the same birthday, so each person you multiply by 365, which is represented by 365 to the power of the number of people.
Dividing the first calculation with the denominator gets you the probability of people with unique birthdays. When they subtract that value from 1, the represents the opposite, the probability of people with the same birthday.