statistics/questions.rst
author anand
Thu, 11 Nov 2010 03:09:49 +0530
changeset 483 a773e2d075eb
parent 349 9ced58c5c3b6
permissions -rw-r--r--
checklist OK for `using python modules`

Objective Questions
-------------------

.. A mininum of 8 questions here (along with answers)

1. What is the function for calculating sum of a list?
   
   sum

2. Calcutate the mean of the given list?
   student_marks=[74,78,56,87,91,82]
   
   mean(student_marks) 


3. Given a two dimensional list,
   two_dimensional_list=[[3,5,8,2,1],[4,3,6,2,1]]
   how do we calculate the mean  of each row?
   

   mean(two_dimensinal_list,1)

4. What is the function for calculating standard deviation of a list?

   std

5. Calcutate the median of the given list?
   student_marks=[74,78,56,87,91,82]

   median(age_list)

6. How do you calculate median along the columns of two dimensional array?
       
    median(two_dimensional_list,0)
       
   
7. What is the name of the function to load text from an external file? 

   loadtxt

8. I have a file with 6 columns but I wish to load only text in column 2,3,4,5. How do I specify that?

   Using the parameter usecols=(2,3,4,5)

Larger Questions
----------------

.. A minimum of 2 questions here (along with answers)

1. Get the weighted mean of [74,64,86,76,83] where the weights are 
   [2,2,1,4,4] respectively.

   Hint: Readup on function average using average?

2. Calculate the weighted standard deviation for the sequence [74,64,86,76,83], such that the weights are [2,2,1,4,4] .