The Birthday Phenomenon - MATLAB Cody - MATLAB Central

Problem 597. The Birthday Phenomenon

Difficulty:Rate

First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into consideration, for simplicity.

The basic question is given an input, a single integer representing the number of people in the room (X >= 1). Return the probability that 2 or more people share the same birthday.

The return from the function should be a value between 0 and 1, inclusive. It should also be rounded out to the 10 thousandth decimal point (4 after the decimal point). There should be no trailing zeros included.

Solution Stats

15.45% Correct | 84.55% Incorrect
Last Solution submitted on Jan 19, 2025

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
11
4

Problem Recent Solvers211

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page