statistics/questions.rst
author anand
Mon, 08 Nov 2010 01:36:47 +0530
changeset 455 f5b7d0b693d9
parent 349 9ced58c5c3b6
permissions -rw-r--r--
checklist OK
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
321
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     1
Objective Questions
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     2
-------------------
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     3
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     4
.. A mininum of 8 questions here (along with answers)
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     5
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     6
1. What is the function for calculating sum of a list?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     7
   
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     8
   sum
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
     9
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    10
2. Calcutate the mean of the given list?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    11
   student_marks=[74,78,56,87,91,82]
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    12
   
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    13
   mean(student_marks) 
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    14
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    15
349
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    16
3. Given a two dimensional list,
321
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    17
   two_dimensional_list=[[3,5,8,2,1],[4,3,6,2,1]]
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    18
   how do we calculate the mean  of each row?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    19
   
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    20
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    21
   mean(two_dimensinal_list,1)
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    22
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    23
4. What is the function for calculating standard deviation of a list?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    24
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    25
   std
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    26
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    27
5. Calcutate the median of the given list?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    28
   student_marks=[74,78,56,87,91,82]
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    29
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    30
   median(age_list)
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    31
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    32
6. How do you calculate median along the columns of two dimensional array?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    33
       
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    34
    median(two_dimensional_list,0)
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    35
       
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    36
   
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    37
7. What is the name of the function to load text from an external file? 
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    38
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    39
   loadtxt
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    40
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    41
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?
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    42
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    43
   Using the parameter usecols=(2,3,4,5)
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    44
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    45
Larger Questions
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    46
----------------
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    47
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    48
.. A minimum of 2 questions here (along with answers)
2e49b1b72996 adding questions for all other LO needs to be cleaned
amit
parents:
diff changeset
    49
349
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    50
1. Get the weighted mean of [74,64,86,76,83] where the weights are 
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    51
   [2,2,1,4,4] respectively.
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    52
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    53
   Hint: Readup on function average using average?
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    54
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    55
2. Calculate the weighted standard deviation for the sequence [74,64,86,76,83], such that the weights are [2,2,1,4,4] .
9ced58c5c3b6 Added long answer type problems in all scripts
amit
parents: 321
diff changeset
    56