1
$\begingroup$

Sorry if its too easy for you guys.

I need to generate few numbers which will be around 20% of all the numbers generated. I am guessing if i can generate random number between 1 to 100. But in that case whats the probability of getting a random number which will be less than 20 in between 1 and 100.

  • 0
    I think it pretty much depends on the probabilistic distribution, *e.g.*, uniform, normal, etc., you use to generate the set of random numbers in the first place.2017-02-20
  • 0
    Do you mean a pseudo-random number? There are many algorithms to provide those. https://en.wikipedia.org/wiki/Pseudorandom_number_generator. If on the other hand you want a truly random number, it's not clear whether there is any such thing. A pseudo-random number generator will have a 1/5 probability of generating a number between 1 and 20 out of a range of 1 to 100, if it's any good.2017-02-20
  • 0
    [Coin throws will yield truly random numbers](https://arxiv.org/abs/1212.0953)2017-02-20
  • 0
    I want to use rand() function of php.2017-02-20
  • 0
    you want to generate one number from 1 to 100 such that some of the numbers must be with 5% probability?2017-02-20
  • 2
    I don't understand exactly what is being asked here. Please state the question more clearly.2017-02-20
  • 0
    Whats the probability of getting a number which will be less than 20 if i try to pick up any numbers between 1 to 100 @Math10002017-02-20
  • 1
    20/100, give or take, assuming uniform distributions. Is this your question?2017-02-20
  • 0
    Are you just interested in integers?2017-02-20

0 Answers 0