2nd PUC Computer Science Chapter 7 Understanding Data Notes | Bubble Sort, Selection Sort, Insertion Sort
Chapter Overview
Data is important for decision making. The chapter explains how data is gathered, stored, processed and analysed to obtain useful information. It also introduces structured and unstructured data and statistical techniques used for summarising data.
7.1 Introduction to Data
People often make decisions using data or information. For example, while choosing a college, one may consider placement data of previous years, educational qualification and experience of faculty members, laboratory and hostel facilities, fees and other information.
Governments systematically collect and record population data through a process called census. Census data provides useful information for planning and formulating policies. Similarly, sports teams analyse previous performances of opponent teams to make strategies. Banks maintain customer data, account details and transaction information.
- Data is plural.
- The singular form of data is datum.
- Computers store data in electronic form because data processing becomes faster and easier compared with manual processing.
- The ICT revolution involving computers, mobiles and the Internet has resulted in generation of large volumes of data at a very fast pace.
Examples of Data
- Name, age, gender and contact details of a person.
- Transaction data generated through banking, ticketing and shopping, whether online or offline.
- Images, graphics, animations, audio and video.
- Documents and web pages.
- Online posts, comments and messages.
- Signals generated by sensors.
- Satellite data including meteorological data, communication data and earth observation data.
7.1.1 Importance of Data
Human beings rely on data for making decisions. Large amounts of data, when processed using computers, can reveal possibilities or hidden traits that may not be visible directly to humans.
Examples Showing Importance of Data
- ATM: When money is withdrawn from an ATM, the bank needs to debit the withdrawn amount from the linked account and therefore needs to maintain and update data.
- Meteorological offices: Satellite data is continuously monitored for upcoming cyclones or heavy rain.
- Business organisations: Market behaviour, customer demands and feedback are analysed to take appropriate actions.
- Dynamic pricing: Airlines and railways may decide prices based on relationships between demand and supply. Cab booking apps may increase or decrease prices according to demand.
- Restaurants: Sales data from different time periods can be analysed to decide when and how much discount to offer.
- Electronic voting machines: Voting data from machines is accumulated to declare election results in a shorter time than manual counting of ballot papers.
- Scientists: Data is recorded during experiments to calculate and compare results.
- Pharmaceutical companies: Data is recorded while trying out a new medicine to see its effectiveness.
- Libraries: Data about books and library membership is maintained.
- Search engines: Results are provided after analysing large volumes of data available on websites across the World Wide Web.
- Weather alerts: Alerts are generated by analysing data received from satellites.
7.1.2 Types of Data
Data comes from different sources and can have different formats. An image is a collection of pixels, a video is made up of frames, a fee slip contains numeric and non-numeric entries, and messages/chats may contain text, icons, images and videos.
Based on format, data can be broadly classified into:
(A) Structured Data
Structured data is usually stored in a computer in a tabular format consisting of rows and columns.
- Each column represents different data for a particular parameter.
- A parameter may be called an attribute, characteristic or variable.
- Each row represents data of an observation for different attributes.
Table 7.1 — Structured Data About Kitchen Items in a Shop
| 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 |
Using a spreadsheet or similar software, the shop owner can find the total number of items by summing the Items_in_Inventory column. The total value of the inventory can be calculated by multiplying each Unit Price by the corresponding Items_in_Inventory and then finding their sum.
Table 7.2 — Attributes Maintained for Different Activities
| Entity / Activities | Data Fields / Parameters / Attributes |
|---|---|
| Books at a shop | BookTitle, Author, Price, YearofPublication |
| Depositing fees in a school | StudentName, Class, RollNo, FeesAmount, DepositDate |
| Amount withdrawal from ATM | AccHolderName, AccountNo, TypeofAcc, DateofWithdrawal, AmountWithdrawn, ATMid, TimeOfWithdrawal |
(B) Unstructured Data
A newspaper contains different types of news items, images and advertisements, but it does not follow a fixed pattern for placing them. Similarly, an email does not have a fixed structure regarding the number of lines or paragraphs or the number of files that can be attached.
Examples of Unstructured Data
- Web pages containing text and multimedia contents such as images, graphics and audio/video.
- Text documents.
- Business reports.
- Books.
- Audio/video files.
- Social media messages.
Although there are ways to process unstructured data, the book focuses on handling structured data.
Metadata
For example, different parts of an email can be described as subject, recipient, main body and attachment. These are metadata for the email data.
Similarly, metadata for an image file may include image size in KB or MB, image type such as JPEG or PNG, and image resolution.
| Concept | Meaning / Example from the Chapter |
|---|---|
| Structured Data | Organised in a well-defined format, usually rows and columns. |
| Unstructured Data | Data not in the traditional row-and-column structure. |
| Metadata | Data about data, such as email parts or image size, type and resolution. |
7.2 Data Collection
Before processing data, we need to collect or gather it. The collected data can then be stored in a file or database for later use.
Example: Sales Data in a Grocery Store
- If sales data is available with the shopkeeper in a diary or register, it can be entered into a digital format such as a spreadsheet.
- If data is already available digitally, for example in a CSV (comma separated values) file, it can be used.
- If the shopkeeper has not recorded data in either form but wants software for maintaining sales data and accounts, software may be developed using a programming language such as Python. It can be used to store and retrieve data from a CSV file or a database management system such as MySQL.
Data Generation and Collection
- Digital interactions continuously generate large volumes of data.
- Hospitals collect patient data to improve their services.
- Shopping malls collect data about items purchased by people.
- Analysis may show that bedsheets and groceries are frequently bought together, which may lead a shop owner to display them near each other to increase sales.
- A political analyst may analyse posts and messages on a social media platform to examine public opinion before an election.
- Organisations such as World Bank and International Monetary Fund (IMF) collect economic data from different countries for economic forecasts.
7.3 Data Storage
After gathering and processing data, it may be stored for future use rather than discarded. Large volumes of data are generated at a high rate, making data storage a challenging task. The decrease in the cost of digital storage devices has helped simplify this task.
Digital Storage Devices Mentioned in the Chapter
Images, documents, audio/videos and other data can be stored as files in computers. School and hospital data can also be stored in data files. Computers can be used to add, modify or delete data in these files and process the data files to obtain results.
7.4 Data Processing
Data contains valuable facts and information useful in decision making. However, conclusions cannot normally be reached just by looking at a vast amount of data. Data needs to be processed to get results and, after analysing those results, conclusions or decisions can be made.
Examples of Automated Data Processing
- Online bill payment
- Registration of complaints
- Booking tickets
Figure 7.1 — Steps in Data Processing
- Data Collection
- Data Preparation
- Data Entry
- Store
- Retrieve
- Classify
- Update
- Reports
- Results
- Processing System
Figure 7.2 — Data Based Problem Statements
A website handling online filling of student details for a competitive examination and generating admit card
A Bank handling withdrawals of cash through ATMs of its own branch
Issue of train ticket
7.5 Statistical Techniques for Data Processing
Given a set of data values, data needs to be processed to obtain information. Various techniques help in getting a preliminary understanding of the data. Summarisation methods are applied on tabular data for easy comprehension.
The chapter discusses two broad groups of statistical techniques:
- Measures of Central Tendency
- Measures of Variability
7.5.1 Measures of Central Tendency
The three most common measures of central tendency are:
(A) Mean
For example, instead of looking at every individual weight of 40 students, the average can be calculated to get an idea about the average weight of the students.
Formula
x̄ = Σxi / n
Assume that height (in cm) of students in a class are:
The mean or average height is:
(B) Median
- For an odd number of values, the median is the value at the middle position.
- For an even number of values, the median is the average of the two middle values.
- Median represents the central value at which the given data is equally divided into two parts.
The height data used for Example 7.1 is first sorted in ascending order:
There are 9 values, which is an odd number. Therefore, the median is the value at position 5:
The median is the actual central value at which the data is equally divided into two parts.
(C) Mode
- Mode is based on the frequency of occurrence of distinct values.
- A data set has no mode if each value occurs only once.
- There may be multiple modes if more than one value has the same highest frequency.
- Mode can be found for both numeric and non-numeric data.
In the height list, 110 is the mode because it occurs 3 times, which is more than the frequency of the other values.
7.5.2 Measures of Variability
Two different data sets can have the same mean, median or mode but completely different levels of dispersion, or vice versa.
The common measures of dispersion or variability discussed are:
(A) Range
- Range is the largest value minus the smallest value.
- Range can be calculated only for numerical data.
- It is a measure of dispersion.
- It tells about the coverage or spread of data values.
- Since range uses two extreme values, an outlier can badly influence the result.
Formula
Range = M − S = Maximum − Minimum
Minimum height = 85 cm
Maximum height = 115 cm
(B) Standard Deviation
Unlike range, which uses only two extreme values, standard deviation considers all the given data.
It is calculated as the positive square root of the average of squared differences of each value from the mean value of the data.
- A smaller standard deviation means the data are less spread.
- A larger standard deviation means the data are more spread.
Formula
σ = √[ Σ(xi − x̄)2 / n ]
The standard deviation is calculated for the height of nine students used while calculating the mean. The mean is:
Each value is subtracted from the mean and the resulting difference is squared. The sum of squared differences is divided by the total number of values and the square root is taken.
Table 7.3 — Standard Deviation of Height of 9 Students
| Height (x) in cm | x − x̄ | (x − x̄)2 |
|---|---|---|
| 85 | -16.33 | 266.67 |
| 90 | -11.33 | 128.37 |
| 90 | -11.33 | 128.37 |
| 100 | -1.33 | 1.77 |
| 102 | 0.67 | 0.36 |
| 110 | 8.67 | 75.17 |
| 110 | 8.67 | 75.17 |
| 110 | 8.67 | 75.17 |
| 115 | 13.67 | 186.87 |
| n = 9 x̄ = 101.33 | Σ(x − x̄)2 = 938.00 | |
Selecting a Suitable Statistical Technique
The chapter asks students to select a suitable statistical technique from Mean, Median, Mode, Range and Standard Deviation for different problems.
| Problem Statement | Choose Suitable Statistical Method |
|---|---|
| The management of a company wants to know about disparity in salaries of all employees. | Standard Deviation |
| Teacher wants to know about the average performance of the whole class in a test. | Mean |
| Compare height of residents of two cities. | Mean |
| Find the dominant value from a set of values. | Mode |
| Compare income of residents of two cities. | Mean |
| Find the popular color for car after surveying the car owners of a small city. | Mode |
Understanding statistical techniques helps in deciding which technique should be used to arrive at a decision. Different programming tools are available for efficient analysis of large volumes of data. These tools use statistical techniques for data analysis.
Python is one such programming tool and has libraries specially built for data processing and analysis. The chapter notes that these are covered in following chapters.
❓ Questions & Answers
1-Mark Questions
2-Mark Questions
| Basis | Structured Data | Unstructured Data |
|---|---|---|
| Organisation | Organised in a well-defined format. | Does not follow the traditional row-and-column structure. |
| Example | Kitchen inventory maintained in rows and columns. | Web pages containing text and multimedia contents. |
Median: The middle value when all values are sorted in ascending or descending order.
3-Mark Questions
- Sales data in a diary or register can be entered into a digital format such as a spreadsheet.
- Already digital data, such as a CSV file, can be used directly.
- If no data has been recorded, software can be developed using a programming language such as Python to store and retrieve data from a CSV file or a database management system such as MySQL.
4/5-Mark Questions
- Input: Data Collection, Data Preparation and Data Entry.
- Processing: Store, Retrieve, Classify and Update.
- Output: Reports and Results through the processing system.
- Mean: Average of numeric values.
- Median: Middle value after sorting the values.
- Mode: Value occurring the most number of times.
- Range: Maximum − Minimum.
- Standard Deviation: Positive square root of the average of squared differences of each value from the mean.
📝 Important Questions
1 Mark
2 Marks
3 Marks
4/5 Marks
⚡ Quick Revision
Important Definitions
- Data — collection of characters, numbers and other symbols representing values.
- Structured data — organised in a well-defined format.
- Unstructured data — data not in traditional row-and-column structure.
- Metadata — data about data.
- Data storage — storing data so it can be retrieved later.
- Mean — average of numeric values.
- Median — middle value after sorting.
- Mode — value occurring most frequently.
- Range — maximum minus minimum.
- Standard deviation — positive square root of average squared difference from mean.
Important Terms
- Datum
- Census
- Attribute
- Characteristic
- Variable
- Metadata
- CSV
- DBMS
- Outlier
- Dispersion
Important Concepts
- Data supports decision making.
- Data can be structured or unstructured.
- Data is collected before processing.
- Data may be stored for future retrieval.
- Processing converts raw data into useful information.
- Statistical techniques help summarise data.
Important Storage Devices
- Hard Disk Drive (HDD)
- Solid State Drive (SSD)
- CD/DVD
- Tape Drive
- Pen Drive
- Memory Card
Important Differences
| Basis | Structured Data | Unstructured Data |
|---|---|---|
| Format | Well-defined format. | No traditional row-and-column structure. |
| Organisation | Usually arranged in rows and columns. | Does not follow a fixed structure. |
| Example | Shop inventory table. | Web pages, text documents, books, audio/video files and social media messages. |
Important Formulas
Important Statistical Techniques
| Technique | Remember |
|---|---|
| Mean | Average of numeric values. |
| Median | Middle value after sorting. |
| Mode | Most frequently occurring value. |
| Range | Maximum − Minimum. |
| Standard Deviation | Measures spread using all given values. |
Important Diagrams / Flowcharts to Revise
- Figure 7.1 — Steps in Data Processing.
- Figure 7.2 — Data Based Problem Statements.
- Data processing cycle: Input → Processing → Output.
🔁 Final Revision
- Data is used for decision making.
- Data can be structured or unstructured.
- Metadata means data about data.
- Data must be collected before processing.
- Data can be stored in files or databases.
- Common storage devices include HDD, SSD, CD/DVD, Tape Drive, Pen Drive and Memory Card.
- Data processing converts raw data into useful information.
- The processing cycle includes Input, Processing and Output.
- Central tendency includes Mean, Median and Mode.
- Variability includes Range and Standard Deviation.
- Mean is sensitive to outliers.
- Median is obtained after sorting the values.
- Mode is based on frequency of occurrence.
- Range uses maximum and minimum values.
- Standard deviation considers all the given data values.
📘 Textbook Exercise
a) Declare exam results and print e-certificates
b) Register participants in an exhibition and issue biometric ID cards
c) To search for an image by a search engine
d) To book an OPD appointment with a hospital in a specific department
a) Recording a video
b) Marking attendance by teacher
c) Writing tweets
d) Filling an application form online
a) Find the average temperature.
b) Find the temperature Range of that week.
c) Find the standard deviation temperature.
a) Teacher wants to compare performance in terms of division secured by students in Class XII A and Class XII B where each class strength is same.
b) Teacher has conducted five unit tests for that class in months July to November and wants to compare the class performance in these five months.
a) Which statistical technique should be used to find out the number of students whose both parents are alumni of this school?
b) How varied are the age of parents of the students of that school?
a) Which mode of data collection should be used?
b) How would you represent the skill of students as data?
a) Compare the purchase and sale price of fruit juice and biscuits.
b) Compare sales of fruit juice, biscuits and samosa.
c) Variation in sale price of fruit juices of different companies for same quantity (in ml).
Create an appropriate dataset for these items (fruit juice, biscuits, samosa) by listing their purchase price and sale price. Apply basic statistical techniques to make the comparisons.
📌 Chapter Summary
- Data refers to unorganised facts that can be processed to generate meaningful result or information.
- Data can be structured or unstructured.
- Hard Disk, SSD, CD/DVD, Pen Drive, Memory Card, etc. are commonly used storage devices.
- Data Processing cycle involves input and storage of data, its processing and generating output.
- Summarising data using statistical techniques helps reveal data characteristics.
- Mean, Median, Mode, Range and Standard Deviation are statistical techniques used for data summarisation.
- Mean is the average of given values.
- Median is the middle value when data is sorted in ascending or descending order.
- Mode is the data value that appears most number of times.
- Range is the difference between the maximum and minimum values.
- Standard deviation is the positive square root of the average of squared difference of each value from the mean.