You are on page 1of 18

Data Analytics with Python

Prof. A Ramesh
Week 2 IIT Roorkee

Musale Krushna Pavan


PMRF
Live Session - 14 Feb 2023 IIT KANPUR
Content

● Week 1 questions
● Python concepts
Week 1 - questions

1. Statement: Descriptive Analytics, is the conventional form of Business Intelligence and


data analysis.
True
False
Week 1 - questions

Which of the following is not an example of predictive analytics?

Linear regression
Time series analysis and forecasting
Bar Graphs
Data mining
Week 1 - questions

State true or False: Statement: Data can be numerical and categorical but cannot be continuous or
discrete

True
False
Week 1 - questions

Which of the following is not an example of Ratio Data?

Height
Year
Age
Weight
Week 1 - questions

Which of the following is a command to have a message appear on the screen?


print
Input
Write
Msg
Week 1 - questions

What is the output from this print() function call: print( '$100 $200 $300'.count('$'), '$100 $200
$300'.count('$', 5, 10), '$100 $200 $300'.count('$', 5) )

310
311
312
313

string.count(value, start, end)

We can check …..


Week 1 - questions

Median is not applicable to 


Ordinal
Interval
Nominal
None of the above 
Week 1 - questions

State True or false: Statement: data can be generated by machines but not by humans.
True
False
Week 1 - questions

Which one of the following is not a classification of Data Analytics?


Diagnostic analytics
Deceptive analytics
Predictive analytics
Prescriptive analytics
Week 1 - questions

For getting 2nd, 4th & 7th row of a datafile “df”in Python programming, we can write:  


df.loc[[2,3,5]]  
df.loc[[1,3,6]]  
df.iloc[2,4,7]  
None of the above  
Questions

Consider the following statements-  Statement A : With iloc, we can pass in the negative
value.  Statement B : With loc, we can pass in the negative value. 

A and B are correct 


Both are false 
A is correct B is false
B is correct A is false 
Questions

A coin is thrown 3 times .what is the probability that atleast one head is obtained?

Sample space : {H,T}


Probability of Head : ½
Probability of tail : ½

mn rule
Event 1 followed by event 2 they are not dependent on each other

Tose a coin & roll a die


{(H,1),(H,2).....} 2*6 =12

{(H,H,H),(H,H,T),(H,T,H),(H,T,T),
(T,H,H), (T,H,T) (T, T, H), (T,T,T)} in total 2*2*2 = 8

Ans : 7/8
Questions

A coin is thrown 3 times .what is the probability that atleast one head is obtained?

Ans : 7/8

3C1(1/2)^1(1/2)^2 + 3C2 0.5^2 0.5^1 + 3C3 0.5^3 (0.5)^0

⅜ + ⅜ +⅛
Questions

There are 5 green 7 red balls. Two balls are selected one by one With replacement. Find the
probability that first is green and second is red.

Probability of green: 5/12


Probability of red : 7/12

5/12*7/12 =35/144

There are 5 green 7 red balls. Two balls are selected one by one Without replacement. Find the
probability that first is green and second is red.

5/12 * 7/11
Python

1. Mean
2. Median
3. Mode
4. Percentiles
5. Range
6. Inter-quartile range
7. Mean Absolute Deviation
8. Variance
9. Standard Deviation
10. Different plots
title

You might also like