|

Data Merging Notes – Class 10 Data Science (419)

Data Merging Notes for Class 10 Data Science covering Data Merging, Types of Joins, Z-Score, Percentiles, Quartiles, and Deciles with clear explanations and solved examples.

This Data Merging Notes is designed according to the latest CBSE Class 10 Data Science syllabus. From the board exam perspective, this chapter carries 11 marks, making it one of the most important topics to master. These notes provide clear explanations, formulas, solved examples, and important concepts to help you learn, practice, revise, and score high in your exams.

Overview of Data Merging

  • Data merging is the process of combining two or more datasets into a single data frame.
  • It is used when data is stored in multiple files or tables but needs to be analysed together.
  • Data merging techniques help simplify the process of combining data.
  • Data merging is useful when integrating old (legacy) systems with new systems.
  • Data merging is performed using data joins.
  • There are three types of data joins:
    • One-to-One Join
    • One-to-Many Join
    • Many-to-Many Join

One-to-One Joins

  • A One-to-One Join is one of the simplest data join techniques.
  • In this join, each row in one table is linked to only one row in another table.
  • The tables are connected using a key column.
  • The key column contains unique values.

Example:

  • In the Employee table, Employee ID is the Primary Key.
  • In the Contact Info table, Employee ID is the Foreign Key.
  • The join returns related records when the Employee ID in both tables is the same.

One-to-Many Joins

  • A One-to-Many Join links one record in one table to one or more records in another table.
  • One record in the first table can have multiple related records in the second table.

Example: A student can borrow multiple books from the school library.

  • In the Students table, Student ID is the Primary Key and contains unique values.
  • In the Library table, Student ID is the Foreign Key and can contain multiple occurrences of the same value.

Many-to-Many Joins

  • A Many-to-Many Join occurs when multiple records in one table are related to multiple records in another table.
  • Example: A student can enroll in multiple courses, and a course can have multiple students.
  • A direct join between many-to-many tables is not easy to perform.
  • To perform the join, the relationship is divided into two One-to-Many relationships.
  • A Join Table is created to connect the two tables.
  • The join table contains matching fields that store the Primary Keys of both tables.
  • These matching fields are called Foreign Keys.
  • In the example:
    • Students table contains a record for each student.
    • Courses table contains a record for each course.
    • Enrollments table acts as the Join Table.
  • Student ID is the Primary Key in the Students table.
  • Course ID is the Primary Key in the Courses table.
  • The Enrollments table contains Student ID and Course ID as Foreign Keys.

What is Z-Score?

  • A Z-score indicates the position of a data value relative to the mean.
  • It measures the distance from the mean in terms of standard deviation units.
  • Z-score is also known as the Standard Score.
  • It helps compare values from different variables by standardizing the distribution.

How to Calculate a Z-Score?

  • The Z-score is calculated using the formula:

Z = (Xμ) / σ

  • Where:
    • X = Raw Score
    • μ = Population Mean
    • σ = Population Standard Deviation
  • The Z-score is obtained by subtracting the population mean from the raw score and dividing the result by the population standard deviation.
  • If the population mean and population standard deviation are unknown, use:
    • x̄ (Sample Mean)
    • Sample Standard Deviation
      as estimates.

Example

Given:

  • Population Mean (μ) = 10 kg
  • Population Standard Deviation (σ) = 2 kg

Question 1: Find the Z-score for 12 kg

  • Formula:
    Answer: Z-score = 1
  • Interpretation: 12 kg is 1 standard deviation above the mean.

How to Interpret the Z-Score?

  • A Z-score indicates how many standard deviations a value is from the mean.
  • If the Z-score = 0, the value is exactly equal to the mean.
  • A positive Z-score means the value is above the mean.
  • Example: A Z-score of +2 means the value is 2 standard deviations above the mean.
  • A negative Z-score means the value is below the mean.
  • Example: A Z-score of −3 means the value is 3 standard deviations below the mean.

Why is a Z-Score Important?

  • A Z-score helps calculate the probability of a value occurring in a normal distribution.
  • It allows comparison of values from different samples.

Concept of Percentiles

  • The 100th percentile represents the maximum value in a dataset.
  • A percentile indicates the percentage of observations that are at or below a particular value.
  • The pth percentile is the value below which p% of the ordered observations lie.
  • To find a percentile:
    • Arrange the data in ascending order.
    • Count the number of values at or below the given value.
    • Divide this count by the total number of observations and convert it into a percentage.

Example

Dataset:
10, 12, 15, 17, 13, 22, 16, 23, 20, 24

  • Sort the data in ascending order:
    10, 12, 13, 15, 16, 17, 20, 22, 23, 24
  • Values at or below 22 = 8
  • Total number of values = 10
  • Percentage = (8 ÷ 10) × 100 = 80%
  • Therefore, 22 is the 80th percentile.

Quartiles

  • Quartiles divide a dataset into four equal parts.
  • Each quartile contains 25% of the ordered data.
  • The four quartiles are:
    • Q1 (25th Percentile) – First Quartile
    • Q2 (50th Percentile) – Median
    • Q3 (75th Percentile) – Third Quartile
    • Q4 (100th Percentile) – Maximum value
  • Q2 is the median and divides the dataset into two equal halves.
  • Q1 is the median of all values to the left of Q2.
  • Q3 is the median of all values to the right of Q2.

Interquartile Range (IQR)

  • Interquartile Range (IQR) measures the spread of the middle 50% of the data.
  • It is calculated using the formula:
    IQR = Q3 – Q1

Example

Dataset:
10, 20, 30, 40, 50, 60, 70, 80, 90, 100

  • Q2 (Median) = 55
  • Q1 = 30
  • Q3 = 80
  • IQR = 80 − 30 = 50

Deciles

  • Deciles divide an ordered dataset into 10 equal parts.
  • The deciles are:
    • D1 (10th percentile)
    • D2 (20th percentile)
    • D3 (30th percentile)
    • D4 (40th percentile)
    • D5 (50th percentile or Median)
    • D6 (60th percentile)
    • D7 (70th percentile)
    • D8 (80th percentile)
    • D9 (90th percentile)
    • D10 (100th percentile)
  • A higher decile indicates a higher ranking.
  • Example:
    • A student scoring 99th percentile belongs to the 10th decile.
    • A student scoring 5th percentile belongs to the 1st decile.

Formula for Decile

Di​=i(n+1)​th/10 Data

Where:

  • n = Number of observations
  • i = Required decile (1 to 9)

Steps to Calculate Deciles

  1. Find the total number of observations (n).
  2. Arrange the data in ascending order.
  3. Calculate the position of the required decile using the formula.
  4. Find the corresponding value from the ordered dataset.

Example: Calculation of Deciles

Given Dataset

  • Raw Data:
    24, 32, 27, 32, 23, 62, 45, 77, 60, 63, 36, 54, 57, 36, 72, 55, 51, 32, 56, 33, 42, 55, 30
  • Number of observations (n) = 23

Step 1: Arrange the Data in Ascending Order

23, 24, 27, 30, 32, 32, 32, 33, 36, 36, 42, 45, 51, 54, 55, 55, 56, 57, 60, 62, 63, 72, 77

Step 2: Calculate the Deciles

First Decile (D₁)

D1 = 1(n+1)/10
= 1(23+1)/10 = 2.4th data

  • Position: Between 2nd (24) and 3rd (27) values.
  • Value:
    24+0.4x(27-24) = 25.2
  • D1 = 25.2

Similarly Remaining Decile values

DecilePositionValue
D₁2.425.2
D₂4.831.6
D₃7.232.2
D₄9.636.0
D₅12.045.0
D₆14.454.4
D₇16.855.8
D₈19.260.4
D₉21.668.4

Application of Deciles

  • Deciles are used to rank and compare data.
  • Example: In school rankings:
    • Students in the top 10% (highest decile) may receive rewards.
    • Students in the bottom 10% (lowest decile) may receive additional academic support.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *