Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
111 views
in Artificial Intelligence (AI) by (178k points)
How do you find the median using percentiles?

Please log in or register to answer this question.

1 Answer

0 votes
by (178k points)

The median can be found using percentiles by calculating the 50th percentile of the dataset. In a dataset, the median is the value that separates the data into two equal halves. This means that 50% of the data points are below the median, and the remaining 50% are above the median.

Here's how you can find the median using the numpy library in Python:

import numpy as np

# Sample dataset
data = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]

# Calculate the median (50th percentile)
median = np.percentile(data, 50)

print("Median:", median)
 

In this code, np.percentile(data, 50) calculates the value at the 50th percentile, which is the median of the dataset. The median value is the value you're looking for.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...