CBSE CS and IP

CBSE Class 11 & 12 Computer Science and Informatics Practices Python Materials, Video Lecture

Descriptive Statistics (2 Marks Questinos)

  1. What is Quantile, Which function is used to find the Quantile? Explain its parameters using full programming Example.

  2. Find the output of the following Command:
    df=pd.DataFrame({'Qty1':[20,30,40],'Qty2':[80,85,82]})
    print(df.var()['Qty1'])
    
  3. For the given code fill in the blanks so that we get the desired output with maximum value for Quantity and Average Value for Cost:
    import pandas as pd
    import numpy as np
    d = {'Product':['Apple','Pear','Banana','Grapes'],
        'Quantity':[100,150,200,250],
        'Cost':[1000,1500,1200,900]}
    df = pd.DataFrame(d)
    df1 =_________________________________
    print(df1)
    
    Quantity      250.0
    Cost          1150.0
    dtype:     float64
    

  4. Write a Program in python to find 0.75 quantile of series[1, 10,20,40,60,70,80,90,100].
  5. A dataframe df1 stores data about passengers, flight and years as below:
    Year Month Passengers
    0 2009 January 112
    1 2009 February 118
    2 2009 March 132
    3 2009 April 129
    4 2009 May 121
    1. Compute total passenger per year.
    2. Compute average passengers per month.
  6. Explain use of std() and mad() with example.
  7. Consider data frame as shown below.
    Category199520002005
    A52148230
    B66136283
    C78176236
    D94122315
    E104154286
    • Write command to calculate minimum value for each column.   
    • Write a command to calculate mean, mode, median for the rows.

No comments:

Post a Comment