We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Tutorials
  3. 10 Days of Statistics
  4. Day 5: Normal Distribution I

Day 5: Normal Distribution I

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

Objective
In this challenge, we learn about normal distributions. Check out the Tutorial tab for learning materials!

Task
In a certain plant, the time taken to assemble a car is a random variable, , having a normal distribution with a mean of hours and a standard deviation of hours. What is the probability that a car can be assembled at this plant in:

  1. Less than hours?
  2. Between and hours?

Input Format

There are lines of input (shown below):

20 2
19.5
20 22

The first line contains space-separated values denoting the respective mean and standard deviation for . The second line contains the number associated with question . The third line contains space-separated values describing the respective lower and upper range boundaries for question .

If you do not wish to read this information from stdin, you can hard-code it into your program.

Output Format

There are two lines of output. Your answers must be rounded to a scale of decimal places (i.e., format):

  1. On the first line, print the answer to question (i.e., the probability that a car can be assembled in less than hours).
  2. On the second line, print the answer to question (i.e., the probability that a car can be assembled in between to hours).

Author

AvmnuSng

Difficulty

Easy

Max Score

30

Submitted By

17850

Need Help?


View tutorial
View discussions
View editorial
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy