Cara menghitung persentil dengan python tanpa numpy

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



0
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



1
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



2
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



5
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



7
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



9________0______4________11___1____1________2

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


5
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


6

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


9
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4

# Python Program illustrating1# Python Program illustrating2________66______3# Python Program illustrating4

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4________66______7
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4

# Python Program illustrating1# Python Program illustrating2# numpy.percentile() method1# Python Program illustrating4

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4# numpy.percentile() method5
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4

# Python Program illustrating1# Python Program illustrating2# numpy.percentile() method9# Python Program illustrating4

Keluaran.  
 

arr :  [20, 2, 7, 1, 34]
50th percentile of arr :  7.0
25th percentile of arr :  2.0
75th percentile of arr :  20.0


  
Kode #2.  
 

Piton




# Python Program illustrating

  _2

 

import numpy as np

 

  _5

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



0
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



1   8________81______9
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4import1
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4import3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4import5_______0______4________82____8__2____8

# Python Program illustrating1

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



2numpy as np1________0______4numpy as np3________3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4numpy as np5
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4numpy as np7________0______4________83______9  0

# Python Program illustrating1

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



2  3________0______4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



5
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4  7
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



9
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4________102______1# 1D array2

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4# 1D array5
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


6

# 1D array_7

# 1D array_8

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



01
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



03# Python Program illustrating2# Python Program illustrating3# Python Program illustrating4

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


3
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


4
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



09
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



4

arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



03# Python Program illustrating2
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



13
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



24
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



1
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



9
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

0th Percentile of arr, axis = 1 : 
 [[17.]
 [15.]
 [ 4.]]

0th Percentile of arr, axis = 1 : 
 [[12.]
 [ 6.]
 [ 1.]]


19
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



1
arr : 
 [[14, 17, 12, 33, 44], [15, 6, 27, 8, 19], [23, 2, 54, 1, 4]]

50th Percentile of arr, axis = None :  15.0
0th Percentile of arr, axis = None :  1.0

50th Percentile of arr, axis = 0 :  [15.  6. 27.  8. 19.]
0th Percentile of arr, axis = 0 :  [14.  2. 12.  1.  4.]

50th Percentile of arr, axis = 1 :  [17. 15.  4.]
0th Percentile of arr, axis = 1 :  [12.  6.  1.]



_11_______21________66______4

Bagaimana Anda menghitung persentil dengan Python?

persentil()fungsi yang digunakan untuk menghitung persentil ke-n dari data yang diberikan (elemen larik) sepanjang sumbu yang ditentukan. .
Sintaksis. numpy. persentil(arr, n, sumbu=Tidak ada, keluar=Tidak ada)
Parameter
arr. larik masukan
N. nilai persentil
sumbu. sumbu sepanjang mana kita ingin menghitung nilai persentil

Bagaimana Anda menghitung persentil secara manual?

Cara menghitung persentil .
Beri peringkat nilai. Urutkan nilai dalam kumpulan data dari yang terkecil hingga yang terbesar
Kalikan k dengan n. Kalikan k (persen) dengan n (jumlah total nilai dalam kumpulan data). .
Bulatkan ke atas atau ke bawah. .
Gunakan kumpulan data peringkat Anda untuk menemukan persentil Anda

Apa cara termudah untuk menghitung persentil?

Cara menghitung persentil .
Masukkan data Anda dalam urutan menaik
Bagilah jumlah nilai di bawah ini dengan jumlah total nilai
Kalikan hasilnya
Temukan persentil kumpulan data Anda
Temukan jumlah item dalam kumpulan data
Kalikan jumlah item dan satu dengan 100

Bagaimana cara menghitung persentil dalam panda?

Ikhtisar Metode Kuantil Panda .
q=[0. 5]. float atau array yang menyediakan nilai kuantil untuk dihitung
sumbu=[0]. sumbu untuk menghitung persentil pada (0 untuk baris dan 1 untuk kolom)
numeric_only=[Benar]. diatur ke False , hitung juga nilai untuk kolom datetime dan timedelta