You are on page 1of 1

Data Science- Lab assignment2

1. In a single toss of 2 fair (evenly-weighted) six-sided dice, write a python code


to find the probability that
i) their sum will be at most 9.
ii) the values rolled by each die will be different and the two dice have a sum
of 6.

2. There are three urns A, B and C. Urn A contains 4 red balls and 3 black balls.
Urn B contain 5 red balls and 4 black balls. Urn C contains 4 red and 4 black balls.
One ball is drawn from each of these urns. Write a python code to find the probability
that 3 balls drawn consist of 2 red ball and 1 black ball.

3) For the data points [1, 2.5, 4, 8, 28], write a Python code without importing
libraries to calculate the central tendency: a) mean b) median c) mode

d) If x= [8.0,1,2.5,4,28.0] and w = [0.1,0.2,0.3,0.25, 0.15], calculate

the weighted mean.

4)Download IRIS flower dataset from Kaggle and

i)Bring out the statistical summary of the dataset

ii) Check for duplicate and missing values.

Write a python code to:

i)Explore the relationship between the variables sepal length and sepal width
and also between petal length and petal width using scatter plot and explain
the inferences observed.

ii)Perform multivariate analysis using pairplot function and discuss the


results.

iii)Use Pearson’s correlation to find the pairwise correlation of all columns


in the dataframe.

You might also like