0
please how do i find 25,50 and 75 percentile of the sequence 1,2,3,4,5,6,7,8,9,10
please would you mind if you help me answer Sir
2 Réponses
+ 3
p% of an array of size = n is given by: (p/100)*n
(25/100) * 10 = 2.5 = 3
(50/100) * 10 = 5 = 5
(75/100) * 10 = 7.5 = 8
+ 3
When using numpy, the function np.percentile() can be used:
import numpy as np
seq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
per_75 = np.percentile(seq, 75)
# result = 7.5 [edited]