jeudi 5 octobre 2017

Sampling from a given probability distribution using R

Given the probability distribution as follows: enter image description here

x-coordinate represents hours, y-coordinate means the probability for each hour.

The problem is how to generate a set of 1000 random data that follows the probability distribution?




Aucun commentaire:

Enregistrer un commentaire