Log-Odds Back to Probability
Kestrel Freight's risk team does its reasoning on the log-odds scale, where each piece of evidence about a job shifts the total by a fixed amount and the pieces can simply be added up. Even money sits at zero there, evidence for lateness pushes the total positive, and evidence against pushes it negative. What comes out at the end of that reasoning is a single log-odds figure, and the dispatch screen cannot display it — customers and drivers want a probability. So the last step of the pipeline is the return journey, back from the log-odds scale to a probability between 0 and 1, using the natural exponential.
Task: Print the probability this log-odds figure corresponds to.
Input
One line holding a single number, the log-odds total for one job. It may be negative and it may have a decimal point.
Output
One line holding the probability rounded to 4 decimal places, with no label.
Example:
Input:
0
Output:
0.5000
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