All problems

Gaussian Naive Bayes

mediumPythonNaive Bayes

Halyard Mail wants to fold a measured feature into the filter -- the size of a message in kilobytes. Counting sightings is no use here, because no two messages are ever exactly the same size, so almost every reading would come back as never seen before. Instead the team summarises what that feature looks like under one label with two numbers: the average reading, and the standard deviation, which is the usual amount a reading sits away from that average. Halyard assumes readings under a label pile up in a bell curve around the average -- crowded near the middle, thinning out either side. A new message arrives with its own reading.

Task: Print that reading's likelihood under this label.

Input

One line holding three numbers separated by single spaces: the average, the standard deviation (never zero), and the new reading.

Output

One line holding the height of the bell curve at that reading, rounded to 4 decimal places. This is a density rather than a probability, so a narrow enough curve pushes it above 1.

Example:

Input:
0 1 0

Output:
0.3989

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…