- 1
What is the 60th percentile of array
Reply
4 Answers
+ 3
An element or an item that is in 60% of the number of element in that array (sorted).
Median is the 50th percentile.
For example if you have 100 elements in a sorted array, then the 60 percentile is your 60th element of array.
The index or position would be the 60% of the number of items.
+ 1
In addition to Eve's good answer if the result of:
no.of.elements*60/100
is not a whole number you must round up the result.
In short (I'll use python syntax):
60th_percentile = math.ceil(len(array)*60/100)
eg. array with 101 elements:
60th_percentile = 61
i.e. the element at the 61-st index of the array.
- 3
complet the code for caculating and printing the 60th percentile of the data array. import numpy as np print(np.(data.60))