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: Poisson Distribution II

Day 5: Poisson Distribution II

Problem
Submissions
Leaderboard
Discussions
Editorial

Objective
In this challenge, we go further with Poisson distributions. We recommend reviewing the previous challenge's Tutorial before attempting this problem.

Task
The manager of a industrial plant is planning to buy a machine of either type or type . For each day’s operation:

  • The number of repairs, , that machine needs is a Poisson random variable with mean . The daily cost of operating is .
  • The number of repairs, , that machine needs is a Poisson random variable with mean . The daily cost of operating is .

Assume that the repairs take a negligible amount of time and the machines are maintained nightly to ensure that they operate like new at the start of each day. Find and print the expected daily cost for each machine.

Input Format

A single line comprised of space-separated values denoting the respective means for and :

0.88 1.55

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 expected daily cost of machine .
  2. On the second line, print the expected daily cost of machine .

Author

AvmnuSng

Difficulty

Easy

Max Score

30

Submitted By

19916

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