Suppose, we wanted to find a point where 70% of samples are above and 30% are below and how are we going to find it. These types of points are called a percentile.
The Nth percentile is called at the point where the N% samples are below.
Percentiles are useful measurements because they show us where a specific value falls within the larger dataset.
Example:
import numpy as np
arr = np.array([ 2, 6, 14, 4, 3, 9, 1, 11, 4, 2, 8])
thirtieth_percentile = np.percentile(arr, 30)
seventieth_percentile = np.percentile(arr, 70)
fourteith_percentile = np.percentile(arr, 40)
print(thirtieth_percentile)
print(seventieth_percentile)
print(fourteith_percentile)
Example:
3.0
8.0
4.0
Some percentiles have specific names:
The 25th percentile is called the first quartile.
The 50th percentile is called the median.
The 75th percentile is called the third quartile.
The difference between the first and third quartile is a value called the interquartile range.
Example:
d = [1, 2, 3, 4, 4, 4, 6, 6, 7, 8, 8]
Now we can calculate 25th and 75th percentile
np.percentile(d, 25) #prints 3.5
np.percentile(d, 75) #prints 6.5
To find the interquartile range, we subtract the value of the 25th percentile from the value of the 75th:
6.5 - 3.5 = 3
Half of the data will fall within the interquartile range. The interquartile range indicates how to spread out our data. The lower the interquartile range value, the less variation there is in our dataset. The higher the value, the greater the variance.
Trainings :
Data Science Training in Indore | Python Training in Indore | Data Analytics Training in Indore | Blockchain Training in Indore | React JS Training in Indore | Web Development Training in Indore | Full Stack Development Training in Indore |Free Courses and Resource :
Dart | OpenCV Tutorials | Projects | Interview Questions | Python Data Structures and Algorithms | Aptitude Tests | Verbal Aptitude | Matplotlib Tutorials | Examples | Interview Questions | HackerRank Python | Pandas Tutorials | Projects | Interview Questions | Rust Tutorials | Projects | Interview Questions | ExpressJS Tutorials | Projects | Interview Questions | Django | MongoDB Tutorials | Examples | Interview Questions | HackerRank C Program Solutions | Python Tutorials by CodersDaily | React.js Tutorials | Golang Tutorials | Projects | Interview Questions | MS Sql Server Tutorials | Examples | Interview Questions | Verbal Ability Tutorial | Numpy Tutorials | Projects | Interview Questions | Power BI Tutorials | Projects | Interview Questions | Example Dashboards | Tensor Flow | HackerRank C++ Solutions | Django REST Framework Tutorial | CodeChef Python Solutions | Leetcode Python Solutions | Reasoning Ability Tutorial | Quantitative Ability Tutorial | C++ Tutorials | HackerRank Java Solutions | TCS NQT Mock Test Series | Verbal Aptitude 2 | HackerRank DSA Solutions | HackerRank SQL Solutions | Javascript | Node.js Tutorials |Interview Questions :
Pandas Tutorials | Projects | Interview Questions | ExpressJS Tutorials | Projects | Interview Questions | Django | Python Tutorials by CodersDaily | Golang Tutorials | Projects | Interview Questions | Numpy Tutorials | Projects | Interview Questions | Django REST Framework Tutorial |Top Colleges in India :
Indian Institute of Technology Bombay | Jaypee University of Engineering and Technology - Guna |