Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use HTML and javascript! As owner of a new business, you have managed to get 25 loyal customers. In order to make them feel

Please use HTML and javascript!

As owner of a new business, you have managed to get 25 loyal customers. In order to make them feel connected to your business, you want to send them cool birthday cards. Your best friend tells you that you should stock a couple of cards at least. You like to always do things Just in Time, and besides you may lose that extra card if you buy more than one. So you feel you should just buy one card before each birthday. Your friend (who took a basic probability class in college) insists that the probability of two people out of 25 having the same birthday (same date, different year) is higher than one would think. Neither of you has looked at the birthday dates of the 25 customers, and you are arguing this over lunch when you are vacationing for a week with your friend. You happen to have your laptop handy and decided to write a program to prove your friend wrong!

Please write a web page that calculates the probability that at least 2 people out of 25 have the same birth-date (different year is fine as long as they have the same date). Business implication: If the probability is higher than 50%, youd probably want to keep a couple of cards handy.

Please upload the zip folder into Harvey by the due time.

Hints: We need to use the fact that there are 365 dates in a year. We need to use an array of 25 integers, where each integer is randomly generated between 1 and 365. We need to carefully study the code and email sent to us regarding calculating the probability of getting the same total if we roll two pairs of dice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions