You are on page 1of 43

Data Science using R

UNIT II

Statistical Modeling: Random variables,


Probability mass/density functions, sample
statistics, hypothesis
testing

Dr. K. Sreenivas B.E. VII Semester CSE-A


1
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
2
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
3
Artificial Intelligence Unit- II A.Y: 2021-22
Random phenomena

Dr. K. Sreenivas B.E. VII Semester CSE-A


4
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
5
Artificial Intelligence Unit- II A.Y: 2021-22
Probability measure

Dr. K. Sreenivas B.E. VII Semester CSE-A


6
Artificial Intelligence Unit- II A.Y: 2021-22
Types of events

Dr. K. Sreenivas B.E. VII Semester CSE-A


7
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
8
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
9
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
10
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
11
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
12
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
13
Artificial Intelligence Unit- II A.Y: 2021-22
Dr. K. Sreenivas B.E. VII Semester CSE-A
14
Artificial Intelligence Unit- II A.Y: 2021-22
Chi-square density function

Dr. K. Sreenivas B.E. VII Semester CSE-A


15
Artificial Intelligence Unit- II A.Y: 2021-22
Moments of pdf

Dr. K. Sreenivas B.E. VII Semester CSE-A


16
Artificial Intelligence Unit- II A.Y: 2021-22
Properties of Gaussian RVs

Dr. K. Sreenivas B.E. VII Semester CSE-A


17
Artificial Intelligence Unit- II A.Y: 2021-22
Joint pdf of two RVs

Dr. K. Sreenivas B.E. VII Semester CSE-A


18
Artificial Intelligence Unit- II A.Y: 2021-22
And in general

Dr. K. Sreenivas B.E. VII Semester CSE-A


19
Artificial Intelligence Unit- II A.Y: 2021-22
Sample statistics: need for sampling

Dr. K. Sreenivas B.E. VII Semester CSE-A


20
Artificial Intelligence Unit- II A.Y: 2021-22
Basic concepts

Dr. K. Sreenivas B.E. VII Semester CSE-A


21
Artificial Intelligence Unit- II A.Y: 2021-22
Basic concepts

Dr. K. Sreenivas B.E. VII Semester CSE-A


22
Artificial Intelligence Unit- II A.Y: 2021-22
Measures of central tendency: Mean

Dr. K. Sreenivas B.E. VII Semester CSE-A


23
Artificial Intelligence Unit- II A.Y: 2021-22
Measures of central tendency: Median

Dr. K. Sreenivas B.E. VII Semester CSE-A


24
Artificial Intelligence Unit- II A.Y: 2021-22
Measures of central tendency: Mode

Dr. K. Sreenivas B.E. VII Semester CSE-A


25
Artificial Intelligence Unit- II A.Y: 2021-22
Measures of spread

Dr. K. Sreenivas B.E. VII Semester CSE-A


26
Artificial Intelligence Unit- II A.Y: 2021-22
Distribution of sample mean and variance

Dr. K. Sreenivas B.E. VII Semester CSE-A


27
Artificial Intelligence Unit- II A.Y: 2021-22
Graphical analysis: Histograms

Dr. K. Sreenivas B.E. VII Semester CSE-A


28
Artificial Intelligence Unit- II A.Y: 2021-22
Graphical analysis: Box plot

Dr. K. Sreenivas B.E. VII Semester CSE-A


29
Artificial Intelligence Unit- II A.Y: 2021-22
Graphical analysis: Scatter plot

Dr. K. Sreenivas B.E. VII Semester CSE-A


30
Artificial Intelligence Unit- II A.Y: 2021-22
Hypotheses Testing
Motivation

Dr. K. Sreenivas B.E. VII Semester CSE-A


31
Artificial Intelligence Unit- II A.Y: 2021-22
Hypothesis testing

Dr. K. Sreenivas B.E. VII Semester CSE-A


32
Artificial Intelligence Unit- II A.Y: 2021-22
Test of hypotheses: Procedure

Dr. K. Sreenivas B.E. VII Semester CSE-A


33
Artificial Intelligence Unit- II A.Y: 2021-22
Test of hypotheses: Remarks

Dr. K. Sreenivas B.E. VII Semester CSE-A


34
Artificial Intelligence Unit- II A.Y: 2021-22
Two sided and one sided tests

Dr. K. Sreenivas B.E. VII Semester CSE-A


35
Artificial Intelligence Unit- II A.Y: 2021-22
Errors in test of hypothesis

Dr. K. Sreenivas B.E. VII Semester CSE-A


36
Artificial Intelligence Unit- II A.Y: 2021-22
Remarks
• If you reject the null hypothesis when in reality it’s true and
must have been accepted, you commit Type I error.
– The LOS is the probability of committing Type I error.
• if you do not reject the Null hypothesis when in reality the
alternative hypothesis is true, you commit Type II error.
P(Type II error)= β.
– On the other hand if the alternative hypothesis is true and you do
reject the null hypothesis in favor of the alternative then you have
made a correct decision and that correct decision probability is
known as power of the statistical test and is denoted by 1 - β.
– You do not control the type II error probability.

Dr. K. Sreenivas B.E. VII Semester CSE-A


37
Artificial Intelligence Unit- II A.Y: 2021-22
Remarks
• Remember that only one of two decisions you
are going to make:
– either going to reject the null hypothesis or you
are not going to reject it.

Dr. K. Sreenivas B.E. VII Semester CSE-A


38
Artificial Intelligence Unit- II A.Y: 2021-22
Test for single population mean

Dr. K. Sreenivas B.E. VII Semester CSE-A


39
Artificial Intelligence Unit- II A.Y: 2021-22
Test for difference in means

Dr. K. Sreenivas B.E. VII Semester CSE-A


40
Artificial Intelligence Unit- II A.Y: 2021-22
Test for difference in variance

Dr. K. Sreenivas B.E. VII Semester CSE-A


41
Artificial Intelligence Unit- II A.Y: 2021-22
Some useful TOH

Dr. K. Sreenivas B.E. VII Semester CSE-A


42
Artificial Intelligence Unit- II A.Y: 2021-22
End of second unit

Dr. K. Sreenivas B.E. VII Semester CSE-A


43
Artificial Intelligence Unit- II A.Y: 2021-22

You might also like