Starting from:
$30

$24

Lab3-Statistics and Probability Distribution Solved

Make a copy of Lab-3-Statistics and Probability Distributions.ipynb python notebook and rename it to Lab-3-<YOUR_NAME>.ipynb. Read the exercises provided in the given python notebook. Write and execute your solution in the respective code shell. Submit your python notebook after completing all the exercises.

Total Marks: 8 marks + 2 marks (individual assessment)=10

HINT

    • Use numpy python library to find mean, median and standard deviation for the given sequence of numbers
    • Use matplotlib python library to plot the histogram

Excercise-1 ( 1 Mark)

John tracked his lunch bills for the past 5 days. He paid $15.10, $12.05, $20.05, $17.75 and $16.25. What was the average amount John paid per meal? Print the result with 2 decimal places.

Excercise-2 ( 1 Mark)

Mark received the following scores in his Graphic Design tests. His final grade is based on the mean of those scores. What will be John's final grade in that course? Print the result with 0 decimal places.

77, 84, 89, 78, 92

Excercise-3 ( 1 Mark)

Find the median and standard deviation for the set of numbers given in Excercise 1 and 2

Excercise-4 ( 3 Marks)

4.1) Plot a histogram for the given below age of population with respect to bin.


Population Age
22,55,62,45,18,21,22,16,34,42,42,4,2,102,42,95,85,55,110,14,50,120,70,65,55,111,115,80,75,65,54,44,43,42,48
Bin
0-10 10-20 30-40 40-50 50-60 60-70 70-80 80-90 90-100 100-110

4.2) Change the bin interval to 50 and replot the histogram

4.3) Which age group has more number of people?
CPS521    Lab3


Excercise-5 ( 1 Mark)

Plot a cumulative distributive function (CDF) for the data given in excercise-4.1

Excercise-6 ( 1 Mark)

Using linespace method from numpy library create 200 sample data between the interval 1 and 50.

Plot the normal distribution using matplotlib library for the sample data.

More products