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 6: The Central Limit Theorem III

Day 6: The Central Limit Theorem III

Problem
Submissions
Leaderboard
Discussions
Editorial

Objective
In this challenge, we practice solving problems based on the Central Limit Theorem. We recommend reviewing the Central Limit Theorem Tutorial before attempting this challenge.

Task
You have a sample of values from a population with mean and with standard deviation . Compute the interval that covers the middle of the distribution of the sample mean; in other words, compute and such that . Use the value of . Note that is the z-score.

Input Format

There are five lines of input (shown below):

100
500
80
.95
1.96

The first line contains the sample size. The second and third lines contain the respective mean () and standard deviation (). The fourth line contains the distribution percentage we want to cover (as a decimal), and the fifth line contains the value of .

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

Output Format

Print the following two lines of output, rounded to a scale of decimal places (i.e., format):

  1. On the first line, print the value of .
  2. On the second line, print the value of .

Author

AvmnuSng

Difficulty

Easy

Max Score

30

Submitted By

13297

Need Help?


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