Home / Computer Science / Class XI / Understanding Data
Understanding Data — CUET Computer Science hero
Class XI 💻 Computer Science Ch 16 of 19

Understanding Data

CUET unit: Understanding Data

📌 Snapshot

  • Data and statistics made practical: structured data, the data cycle, mean, median, mode and spread.
  • Why a table with rows and columns is structured data, while an email or a newspaper page is not.
  • How raw data moves through input, processing and output to become a report, an admit card or a ticket.
  • Five statistical measures worked on the same numbers, with the rule for choosing which one to use.

📖 Detailed Notes

Written and reviewed by Rohit Singh, Computer Science & Commerce faculty at UniDrill (MCA, Osmania University · 6 years teaching). Based on NCERT Informatics Practices Class XI, Chapter 5.

Can 2,000 salary figures tell you which college to join?

A college has a list of 2,000 students placed in the last three years, each with a company and a salary. Staring at that list tells you nothing. You cannot say whether placements are good. Now suppose the college summarises it: the average package, the middle package, the lowest and highest. Suddenly you can decide. That jump from a pile of numbers to a decision is what this chapter is about: collecting data, storing it, processing it, and using a few statistics to understand it.

What is data, and why does it matter?

Data is a collection of characters, numbers and other symbols that represent values of some situation or variable. The word is plural, and the singular is datum. Data are stored in electronic form because computers process them much faster and more easily than people can by hand. The growth of computers, mobiles and the Internet (the ICT revolution) now produces data in huge volume and at high speed.

Computers process data to generate information, and analysing and interpreting information gives knowledge. Data is the raw material, and information is what you get after processing it.

Source of data Examples
Personal records Name, age, gender, contact details
Transactions Banking, ticketing, shopping, online or offline
Multimedia Images, graphics, animations, audio, video
Documents and the web Documents, web pages, online posts, comments, messages
Machines Signals from sensors
Satellites Meteorological, communication and earth observation data

Why data matters. Decisions work better when they rest on data. People use data to choose a college, governments use census data to plan policies, sports coaches study opponents' performances, and banks keep customer records so they can update a balance after an ATM withdrawal. Processing large data on a computer can also show hidden patterns that humans cannot see directly.

Where data is used What is decided
Airlines, railways, cab apps Dynamic pricing, based on the relationship between demand and supply
Restaurants When and how much discount to offer, for example happy hours, from sales data at different times
Electronic voting machines Votes from all machines are combined to declare results quickly
Scientists and pharmaceutical companies Compare experiment results and check how effective a new medicine is
Libraries Records of books and members
Search engines Results come from analysing a very large volume of web data
Meteorological offices Weather alerts from satellite data, for example for a cyclone

Types of data: structured and unstructured

Data come in different formats. An image is a collection of pixels, a video is made of frames, a fee slip has a few numeric and non numeric entries, and a chat message may contain text, emoticons and pictures. On the basis of format, data falls into two broad categories.

Feature Structured data Unstructured data
Organisation Organised in a well defined format No fixed pattern or format
Usual storage Table of rows and columns Files in their original form
Rows and columns Each column is an attribute (characteristic or variable). Each row is one observation Not in the traditional row and column structure
Examples Inventory table, fee records, ATM withdrawal records Newspaper layout, email content, web pages with multimedia, text documents, reports, books, audio and video files, social media messages
Focus in this book Yes Only mentioned

Why a newspaper is unstructured. One day a page may have three images and five stories, and the next day one big image and three stories. There is no fixed pattern. An email is similar: nothing fixes how many lines or attachments it holds.

Structured data in action. A shop keeps this inventory table.

ModelNo ProductName Unit Price Discount(%) Items_in_Inventory
ABC1 Water bottle 126 8 13
ABC2 Melamine Plates 320 5 45
ABC3 Dinner Set 4200 10 8
GH67 Jug 80 0 10
GH78 Table Spoon 120 5 14
GH81 Bucket 190 12 6
NK2 Kitchen Towel 25 0 32

Because the data is in columns, a spreadsheet or a program can sum or multiply a whole column. Here each column is an attribute and each row is one item.

Worked example: totals from a table. Find the total number of items, and the total value of the stock (unit price multiplied by items in inventory).

Step What we do Result
1 Add the column Items_in_Inventory $13 + 45 + 8 + 10 + 14 + 6 + 32 = 128$ items
2 Multiply price by items for each row 1638, 14400, 33600, 800, 1680, 1140, 800
3 Add those products Total value = ₹54058

The common wrong step is to add the Unit Price column and the Items column together. Adding prices does not give a value. You must multiply each row's price by that row's count first, and only then add.

The same data in code, using a list of pairs (price, items) and the loop ideas from the Python chapters:

Code
stock = [(126, 13), (320, 45), (4200, 8), (80, 10), (120, 14), (190, 6), (25, 32)]
total_items = 0
total_value = 0
for price, items in stock:
    total_items = total_items + items
    total_value = total_value + price * items
print(total_items, total_value)
Output
128 54058

Metadata. Metadata is data about data. Unstructured data is often described using metadata. An email has a subject, recipient, main body and attachment. An image file has a size (KB or MB), a type (JPEG, PNG) and a resolution.

Beyond the textbook. For the exam: metadata means data about data, with email subject and image size as the examples. In reality: a photograph taken on a phone usually carries extra metadata such as the date and time, and often the device and the location, stored inside the file. Why it matters: metadata can reveal more than the picture itself, which is why privacy settings often offer to remove it before sharing.

Pause and predict: a college stores student records with columns RollNo, Name and Marks. Is this structured or unstructured, and what is "Marks" called?

Check your answer: structured, because it is organised in rows and columns. Marks is an attribute (also called a variable or characteristic), and each student is one row.

Data collection

To process data, you first collect it. Data collection means identifying data that is already available or gathering it from the right sources, and then storing it in a file or a database. Take a grocery store with sales data. There are three situations.

Situation What to do
Sales data is in a diary or register Enter it in a digital format, for example a spreadsheet
Data is already digital, say in a CSV (comma separated values) file Use it directly
Nothing has been recorded Develop software, in a language such as Python, that stores and retrieves the data from a CSV file or a database management system such as MySQL

Data is continuously being generated: hospitals collect patient data to improve services, and shopping malls record what people buy. If analysis shows that bedsheets and groceries are often bought together, the owner can display bedsheets near the grocery section to increase sales. A political analyst may study social media posts to see public opinion, and organisations such as the World Bank and the IMF collect economic data from countries for forecasting.

Data storage

Once data is gathered and processed, we usually keep it for future use. Data storage is storing data on storage devices so that it can be retrieved later. Large volumes arrive at a high rate, so storage is a challenge, but falling prices of digital storage have helped.

Device Note
Hard Disk Drive (HDD) Common magnetic disk storage
Solid State Drive (SSD) No moving parts, fast
CD / DVD Optical discs
Tape drive Used for large archives
Pen drive Portable
Memory card Small and portable, used in phones and cameras

Data like images, documents and audio or video are stored as files, and school or hospital data is kept in data files. File processing has limitations, which a Database Management System (DBMS) is designed to overcome.

Data processing

Looking at a large pile of raw data does not give a conclusion. Data must be processed to get results, and after analysing those results we arrive at conclusions or decisions. Processing turns raw data (numbers, text, images) into information (in the form of tables, charts or text).

The data process cycle in one line: Input (data collection, data preparation, data entry) → Processing (store, retrieve, classify, update) → Output (reports, results).

Many everyday services follow this cycle: online bill payment, registering a complaint, booking tickets.

Problem Input data Processing Output
Online form for a competitive exam Name, address, qualification, marks, mobile number, photo and sign, centre choice, fee payment details Check correctness, eligibility, fee paid, photo and signature uploaded. Then generate a roll number and add the applicant to the eligible list Admit card with roll number, centre address, date and time
Cash withdrawal at an ATM ATM PIN, account type and number, card number, ATM location, date and time, amount Check the PIN and balance. If satisfied, deduct the amount, count the notes and start printing the receipt Currency notes and a printed slip
Train ticket Start and end stations, date, number of tickets, class, berth preference, passenger names and ages, mobile and email, payment details Confirm the login, check berth availability, confirm payment, deduct from the available tickets, allocate PNR and berth or a waiting number Ticket with berth and coach number, or a waiting list number

Why this table is useful. In any such question, ask three things: what goes in, what is checked or calculated, and what comes out. That is the entire cycle.

Pause and predict: in the ATM example, which part of the cycle is "checking for a valid PIN and balance"?

Check your answer: processing. The PIN and amount are input, the checks and the deduction are processing, and the notes and slip are output.

Statistical techniques: summarising data

To understand data quickly, we summarise it using statistics. There are two families. Measures of central tendency give one value that represents the data (mean, median, mode). Measures of variability (also called measures of dispersion) tell how spread out the values are (range, standard deviation).

We will use one data set throughout: the heights, in cm, of nine students.

$$\text{Heights} = [90, 102, 110, 115, 85, 90, 100, 110, 110]$$

Mean: the average

The mean (average) is the sum of the values divided by how many there are.

$$\bar{x} = \dfrac{\sum_{i=1}^{n} x_i}{n}$$

$$\text{Mean} = \dfrac{90 + 102 + 110 + 115 + 85 + 90 + 100 + 110 + 110}{9} = \dfrac{912}{9} \approx 101.33\ \text{cm}$$

The mean works on numerical data. It is sensitive to outliers. An outlier is an exceptionally large or small value compared with the rest, and it can pull the average away from where most of the data sits.

Median: the middle value

To find the median, sort the values and take the middle one. If there is an odd number of values, the median is the value at the middle position. If there is an even number, it is the average of the two middle values. It splits the data into two equal halves.

Sorted heights: $[85, 90, 90, 100, 102, 110, 110, 110, 115]$. There are 9 values, so the median is the 5th value, which is 102 cm, whether you count from the left or from the right.

Pause and predict: the marks 12, 15, 11, 18, 14, 20 are given. What is the median?

Check your answer: 14.5. Sorted, they are 11, 12, 14, 15, 18, 20. There are six values, so take the average of the two middle values 14 and 15, which is $(14 + 15)/2 = 14.5$.

Mode: the most frequent value

The mode is the value that appears the most times. It depends on how often each distinct value occurs. A data set has no mode if every value occurs only once, and it can have more than one mode if several values tie for the highest frequency. Mode can be found for numeric and non numeric data. In the heights, 110 appears 3 times, more than any other value, so the mode is 110 cm.

Measure Answers the question Works for Affected by outliers?
Mean What is the average? Numbers Yes, strongly
Median What is the middle value? Numbers Little
Mode What is the most common value? Numbers and categories No

Why three measures? They answer different questions. A single "average" can mislead. If four people earn ₹20, ₹22, ₹25 and ₹24 thousand and a fifth earns ₹300 thousand, the mean is ₹78.2 thousand, a figure that nobody in the group is near. The median is ₹24 thousand, which describes the typical person much better.

Beyond the textbook. For the exam: outliers are treated as errors and are removed before calculating the mean. In reality: an outlier is not always a mistake. A genuinely very high salary is real data, and deleting it hides a true feature of the group. Analysts therefore often keep it and report the median alongside the mean. Why it matters: this is why income is usually quoted as a median, and why "which measure should I use?" depends on the data.

Range: the simplest spread

The range is the difference between the maximum and minimum values. It works only for numerical data. Because it uses only the two extreme values, an outlier can badly distort it.

$$\text{Range} = \text{Maximum} - \text{Minimum} = 115 - 85 = 30\ \text{cm}$$

Standard deviation: spread using every value

The standard deviation, written $\sigma$, uses every value, not just the extremes. It is the positive square root of the average of the squared differences of each value from the mean.

$$\sigma = \sqrt{\dfrac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n}}$$

A small standard deviation means the data is closely packed around the mean. A large one means it is widely spread.

Why squares? Deviations above the mean are positive and below the mean are negative, and they cancel out. For the heights, the deviations add up to almost exactly zero. Squaring makes every deviation positive, so they add instead of cancelling. The square root at the end brings the answer back to the original unit (cm).

Worked example: standard deviation of the heights. The mean is 101.33 cm.

Step What we do Result
1 Subtract the mean from each height -11.33, 0.67, 8.67, 13.67, -16.33, -11.33, -1.33, 8.67, 8.67
2 Square each difference 128.37, 0.36, 75.17, 186.87, 266.67, 128.37, 1.77, 75.17, 75.17
3 Add the squares 938.00
4 Divide by $n = 9$ $938 / 9 \approx 104.22$
5 Take the square root $\sigma = \sqrt{104.22} \approx 10.2\ \text{cm}$

The common wrong step is to stop at 104.22. That number is the average squared difference, in cm squared. The standard deviation is its square root.

Worked example: a simple standard deviation by hand. Data: 2, 4, 4, 4, 5, 5, 7, 9. Find the mean and standard deviation.

Step What we do Result
1 Mean = $(2+4+4+4+5+5+7+9)/8 = 40/8$ 5
2 Differences from 5 -3, -1, -1, -1, 0, 0, 2, 4
3 Squares 9, 1, 1, 1, 0, 0, 4, 16
4 Sum of squares 32
5 Divide by 8, then take the root $\sqrt{32/8} = \sqrt{4} = 2$

Beyond the textbook. For the exam: divide by $n$, the total number of values. In reality: when the data is only a sample taken from a larger group, statisticians divide by $n - 1$ instead, which is the usual sample standard deviation. Why it matters: the two formulas differ slightly, so use the one the question gives. In this chapter the divisor is $n$.

Putting it together in Python

The same measures can be computed with the list ideas from the earlier chapters.

Code
heights = [90, 102, 110, 115, 85, 90, 100, 110, 110]
mean = sum(heights) / len(heights)
print(round(mean, 2))
heights.sort()
print(heights[len(heights) // 2])
print(max(heights) - min(heights))
print(heights.count(110))
Output
101.33
102
30
3

The second print finds the middle element of the sorted list: for 9 values the middle index is 9 // 2, which is 4, and heights[4] is 102. That trick works only when the number of values is odd. For an even count you average the two middle values. The last line counts how many times 110 occurs, which gives its frequency.

Worked example: weekly temperatures. The temperature (in degrees Celsius) over seven days was 34, 34, 27, 28, 27, 34, 34. Find the mean, median, mode and range.

Measure Working Result
Mean $(34 + 34 + 27 + 28 + 27 + 34 + 34)/7 = 218/7$ About 31.14
Median Sorted: 27, 27, 28, 34, 34, 34, 34. The 4th value 34
Mode 34 occurs 4 times 34
Range $34 - 27$ 7

For the standard deviation of these temperatures, the squared differences from 31.14 add up to about 76.86, so $\sigma = \sqrt{76.86/7} \approx 3.31$.

Choosing the right technique

Problem Technique Why
Management wants to know the disparity in employees' salaries Range or standard deviation Disparity means spread
Teacher wants the average performance of the class Mean Average of a numeric attribute
Compare the heights of residents of two cities Mean Compares the typical height
Find the dominant value in a set of values Mode Most frequent value
Compare incomes of residents of two cities Median A few very high incomes would distort the mean
Find the most popular car colour in a small city Mode Colour is non numeric data. Only mode works
How varied are the ages of parents in a school Standard deviation Measures spread using every value

Why it matters. The question word is the clue: "average" suggests mean, "middle" suggests median, "most common" or "popular" suggests mode, and "spread", "variation" or "difference" suggests range or standard deviation.

Exam traps

The trap Why it's tempting The truth
"Data and information mean the same." We use them interchangeably Data is raw. Information is data after processing
"An email is structured data." It has a subject and body It has no fixed row and column format, so it is unstructured
"Metadata is the main content of a file." It sounds important Metadata is data about data, such as image size or email subject
"The median of an even number of values is the lower middle value." Odd cases give a single middle Take the average of the two middle values
"Mode always exists and is unique." The most frequent value sounds unique There may be no mode, or more than one
"Range uses all the values." It measures spread It uses only the maximum and minimum
"Mean is best when there are extreme values." It is the best known measure Outliers distort the mean, so the median is safer
"Standard deviation is the average of squared differences." The formula has an average inside The standard deviation is the square root of that average
"Mode can only be found for numbers." The other measures need numbers Mode works for non numeric data too

60-second revision

Topic Lock this in
Data Raw facts (characters, numbers, symbols) · singular is datum · processing gives information
Structured Rows and columns · column is an attribute, row is an observation
Unstructured No fixed format: email, newspaper, web page, audio, video
Metadata Data about data: email subject, image size, type and resolution
Collection Register → spreadsheet · CSV file · software with Python and MySQL
Storage HDD, SSD, CD/DVD, tape, pen drive, memory card · files, then DBMS
Process cycle Input (collect, prepare, enter) → processing (store, retrieve, classify, update) → output (reports, results)
Mean $\bar{x} = \sum x_i / n$ · affected by outliers
Median Middle of sorted data · average of two middle values if the count is even
Mode Most frequent · may be none or many · works for non numeric data
Range Maximum − minimum · numeric only
Standard deviation $\sigma = \sqrt{\sum (x_i - \bar{x})^2 / n}$ · uses all values · small means closely packed

Where this chapter connects

🎯 Practice MCQs

First 3 questions free · create a free account to unlock the rest — answers & explanations included, no payment needed

Q1. Which of the following is an example of unstructured data?

▸ Show answer & explanation

Answer: C

An email has no fixed format for lines, paragraphs or attachments, so it is unstructured. The other three are organised in rows and columns of defined attributes.

Q2. In a table of structured data, what does each row represent?

▸ Show answer & explanation

Answer: C

Each column is an attribute, also called a characteristic or variable, and each row holds one observation across all attributes. Metadata is data about data, which is a different idea.

Q3. Metadata is best described as:

▸ Show answer & explanation

Answer: B

Metadata describes other data, for example the size and resolution of an image or the subject of an email. The other options describe size, a file format and a source.

🔒 12 more practice MCQs

Create a free account to unlock every MCQ in this chapter — answers and explanations included. No payment needed.

Already registered? Just log in and they'll all appear here.

📊 Previous-Year Questions

Practise with real CUET Computer Science previous-year papers — every question solved, with the correct answer and a step-by-step explanation.

View solved CUET PYQ papers →

Ready to drill Computer Science?

Unlock all MCQs, chapter tests, mocks & PYQs for ₹199/year.

Get UniDrill Pro