1 of 20

དཔལ་ལྡན་འབྲུག་གཞུང་། ཤེས་རིག་དང་རིག་རྩལ་གོང་འཕེལ་ལྷན་ཁག།

Department of School Education

Ministry of Education & Skills Development

Online Training for ICT Teachers

24 February 2023

Classes XI & XII ICT Curriculum

Data Science SESSION I

2 of 20

Introduction to Data Science

Why to learn Data Science?

3 of 20

Session Overview

Data Science

Competency

Career

Opportunities

What?

NumPy

Prerequisites

Why

4 of 20

Competency

Present a visual representation of a dataset by applying data analysis modules in a programming language to communicate a message.

5 of 20

What is Data Science?

Extracting Insights

Extracting insights & knowledge from data using scientific methods, algorithms, & systems.

Decision Making

Make predictions, identify patterns, & support decision-making based on data.

Preparation of Data

Collection, cleaning & preparation of data

03

01

02

6 of 20

Why Data Science?

Create predictive models

03

  • Can be used in finance, healthcare, & marketing
  • Make future predictions to make better decisions

Gain valuable insights

02

  • Used to gain valuable insights from data
  • Organizations can make better decisions
  • Cost savings, increased efficiency

High demand for professionals

01

  • Growing field
  • Most in-demand skills in job market

Gain a competitive advantage

04

  • Competitive advantage because of valuable insights
  • Improve products, services, or operations

7 of 20

Career Opportunities

Data Scientist

  • Analyze & interpret complex data
  • Identity patterns
  • Make predictions
  • Wooks in Finance, healthcare & technology

Data Analyst

  • Clean, organize and interpret data
  • Identify patterns & trends in data
  • Works in finance, healthcare & retail

BI Analyst

  • Create visual representations of data
  • Support decision-making within an organization

ML Engineer

  • Design, develop & implement ML models & algorithm
  • Create predictive models & improve decision-making
  • Works in finance, healthcare, & technology

8 of 20

Prerequisite to learn Data Science

Mathematical skills

Calculus and linear algebra

Statistics

Probability, statistical inference, & hypothesis testing

DBMS & SQL

Basic knowledge of

Data & DBMS

Programming skills

Python or R

Communication skills

Neet to present their findings to non-technical stakeholders

Note: The prerequisites is not compulsory but good if you already have

9 of 20

Hands on Practice - Activity 1 Task 1

Write a Python program to add the marks obtained by four students in two-term examinations which are given in the table below.

  • You may have to use data structure learned in core Python programming to add and store the total values

Student

Midterm (40)

Annual (60)

1

34

45

2

20

19

3

17

35

4

36

45

10 of 20

Data Science Part I

11 of 20

Objectives

Generate insights using statistical analysis for the given dataset using NumPy

Explain the advantages of using NumPy in Data Analysis

Perform arithmetic operations on Data using NumPy

Access the element for analysis using NumPy

12 of 20

Content Scope

Array Dimension

  • Zero-dimensional array
  • One- dimensional array
  • Two -dimensional array

Accessing array

  • Indexing
  • Slicing
  • Shape, size

Intro to NumPy

What and why NumPy

Array

Creating array using array() method

Mathematical Operation

  • Addition
  • Subtraction
  • Multiplication

Statistical Analysis

  • Min, max, range
  • Var, std, mean, median
  • Q1, Q2, Q3

13 of 20

NumPy prerequisites

Windows user

  • Installation
    • Open cmd and type
    • pip install numpy
  • Importing
    • Open IDLE or Jupyter Notebook
    • import numpy as np

macOS user

  • Installation
    • Open terminal and type
    • pip3 install numpy
  • Importing
    • Open IDLE or Jupyter Notebook
    • import numpy as np

14 of 20

What is NumPy?

1

Library that provides support for large, multi-dimensional arrays and matrices of numerical data

2

Library of mathematical functions

3

Used in scientific and data analysis

4

Used as input and output for other libraries

15 of 20

Terms used in NumPy array

Number of rows and columns in an array - data.shape

Gives the number of element in an array - data.size

Technique to access a particular item

Technique to access a range of values

Shape

Size

Indexing

Slicing

16 of 20

Activity 1 - Task 2

Matrix A describes how many hours Deki, Dorji, and Karma spent on their English, Math, and Dzongkha homework one night. Matrix B describes how many hours they spent the next night. Write a Python program using NumPy to

  • Create two arrays out of the matrix given above
  • Find the dimensions and number of element of an array
  • Try to access element from first row and second column of day 1
  • Display only amount of time spent on Dzongkha from the first night
  • Calculate the total time spent on each subject by three students

17 of 20

NumPy methods for Data Analysis

Analysis

std()

var()

min()

max()

ptp()

mean()

median()

Q1()

Q2()

Q3()

18 of 20

Demonstration

  • Installation of NumPy library
  • Importing the library as alias
  • Creating NumPy array from Tuple & List
  • Checking the order (shape) & number of elements (size)
  • Arithmetic Operation (Addition, Subtraction, Multiplication)
  • Measures of central tendency (min, max, ptp)
  • Statistical analysis (std, var, Q1, Q3)

19 of 20

Activity 2

According to the Population and Housing Census of Bhutan, 2017, the population of twenty Dzongkhags is as follows

Calculate the following:

  1. Min population
  2. Max population
  3. Range
  4. Mean population
  5. Median population
  6. Standard deviation
  7. Variance
  8. Q1 & Q3
  9. Make an inference from the result obtained

20 of 20

Thank you for your time