alexandre10044 / 204ducks

Epitech Project, MATHS 204

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

204ducks

Epitech Project, MATHS 204

Subject:

When ducks are disturbed by a sudden noise, they fly away almost simultaneously, and everything is de-serted. Chances that a duck will then come back aftertminutes are given by the following probability den-sity function: f: [0,+∞[−→Rt7−→ae−t+ (4−3a)e−2t+ (2a−4)e−4t

where a is a real constant between 0 and 2.5, which depends on external factors (such as temperature, daytime, duck’s health etc.).

A study is being conducted about these ducks, and you are asked to compute and display the following,given the value of a:

  1. The average time after which ducks come back,
  2. The standard deviation of the ducks’ return time,
  3. The time after which 50% of all of the ducks are back,
  4. The time after which 99% of all of the ducks are back,
  5. The percentage of ducks that come back after 1 minute,
  6. The percentage of ducks that come back after 2 minutes.

Usage:

./204ducks a

a is a constant

Example:

alt text

About

Epitech Project, MATHS 204


Languages

Language:C++ 88.5%Language:Makefile 11.5%