statistics/slides.org
changeset 450 d49aee7ab1b9
parent 321 2e49b1b72996
equal deleted inserted replaced
443:79a7ca3073d4 450:d49aee7ab1b9
     1 #+LaTeX_CLASS: beamer
     1 #+LaTeX_CLASS: beamer
     2 #+LaTeX_CLASS_OPTIONS: [presentation]
     2 #+LaTeX_CLASS_OPTIONS: [presentation]
     3 #+BEAMER_FRAME_LEVEL: 1
     3 #+BEAMER_FRAME_LEVEL: 1
     4 
     4 
     5 #+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent}
     5 #+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
     6 #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
     6 #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
     7 #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
     7 #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
     8 #+OPTIONS:   H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
     8 
       
     9 #+LaTeX_CLASS: beamer
       
    10 #+LaTeX_CLASS_OPTIONS: [presentation]
       
    11 
       
    12 #+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl}
       
    13 #+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
       
    14 
       
    15 #+LaTeX_HEADER: \usepackage{listings}
       
    16 
       
    17 #+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries,
       
    18 #+LaTeX_HEADER:  commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
       
    19 #+LaTeX_HEADER:  showstringspaces=false, keywordstyle=\color{blue}\bfseries}
     9 
    20 
    10 #+TITLE: Statistics
    21 #+TITLE: Statistics
    11 #+AUTHOR: FOSSEE
    22 #+AUTHOR: FOSSEE
    12 #+DATE: 2010-09-14 Tue
    23 #+DATE
    13 #+EMAIL:     info@fossee.in
    24 #+EMAIL:     info@fossee.in
    14 
    25 
    15 # \author[FOSSEE] {FOSSEE}
    26 #+DESCRIPTION: 
       
    27 #+KEYWORDS: 
       
    28 #+LANGUAGE:  en
       
    29 #+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
       
    30 #+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc
    16 
    31 
    17 # \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
       
    18 # \date{}
       
    19 
    32 
    20 * Tutorial Plan 
    33 * Outline 
    21 ** Doing simple statistical operations in Python  
    34  - Doing statistical operations in Python  
    22 ** Using loadtxt to solve statistics problem
    35    - Summing set of numbers
       
    36    - Finding there mean
       
    37    - Finding there Median
       
    38    - Finding there Standard Deviation 
       
    39 
       
    40 * Data set
       
    41   - A;015163;JOSEPH RAJ S;083;042;47;00;72;244;;; 
       
    42 
       
    43   The following are the fields in any given line.
       
    44    - Region Code which is 'A'
       
    45    - Roll Number 015163
       
    46    - Name JOSEPH RAJ S
       
    47    - Marks of 5 subjects: -- English 083 -- 
       
    48      Hindi 042 -- Maths 47 --
       
    49      Science 35 -- Social 72
       
    50    - Total marks 244
       
    51 
       
    52 * Question
       
    53   - In the given file football.txt at path /home/fossee/football.txt , 
       
    54     one column is player name,second is goals at home 
       
    55     and third goals away.
       
    56     - Find the total goals for each player
       
    57     - Mean home and away goals
       
    58     - Standard deviation of home and away goals 
       
    59 
       
    60 * Solution
       
    61 #+begin_src python
       
    62   L=loadtxt('/home/amit/football.txt',usecols=(1,2),
       
    63             delimiter=',')
       
    64   sum(L,1)
       
    65   mean(L,0)
       
    66   std(L,0)
       
    67 #+end_src python
    23 
    68 
    24 * Summary 
    69 * Summary 
    25 **  seq=[1,5,6,8,1,3,4,5]
    70   - sum
    26 **  sum(seq)
    71   - mean
    27 **  mean(seq)
    72   - median
    28 **  median(seq)
    73   - std
    29 **  std(seq)
       
    30 
    74 
    31 * Summary
       
    32 
       
    33 ** loadtxt