L
L
likeh8r2017-06-02 14:31:16
Mathematics
likeh8r, 2017-06-02 14:31:16

How to calculate the probability of a number appearing K times on a segment N?

The random number generator generates N numbers from A to B. How to count the number of possible occurrences of the number n exactly K times?
For example:
10 numbers are generated from 1 to 5. Total possible variations of the number series: 5^10 = 9765625.
How many of these 9765625 ones will be generated exactly 4 times?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tsarevfs, 2017-06-02
@tsarevfs

(number of ways to select k elements from n)*(number of ways to fill in nk elements)
for the first see "combinations", 2 you already know how to count.

M
Mercury13, 2017-06-02
@Mercury13

C 10 4 ·(5−1) 10−4
Arrange ones (C 10 4 ) ways, then put everything else ((5−1) 10−4 ).
To calculate the probability, we must also divide by 5 10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question