diff -r 79a7ca3073d4 -r d49aee7ab1b9 statistics/slides.org --- a/statistics/slides.org Wed Nov 10 17:25:18 2010 +0530 +++ b/statistics/slides.org Thu Nov 11 01:37:32 2010 +0530 @@ -2,32 +2,73 @@ #+LaTeX_CLASS_OPTIONS: [presentation] #+BEAMER_FRAME_LEVEL: 1 -#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\useoutertheme{infolines}\usecolortheme{default}\setbeamercovered{transparent} +#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra) #+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 -#+OPTIONS: H:5 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t + +#+LaTeX_CLASS: beamer +#+LaTeX_CLASS_OPTIONS: [presentation] + +#+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl} +#+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} + +#+LaTeX_HEADER: \usepackage{listings} + +#+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries, +#+LaTeX_HEADER: commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, +#+LaTeX_HEADER: showstringspaces=false, keywordstyle=\color{blue}\bfseries} #+TITLE: Statistics #+AUTHOR: FOSSEE -#+DATE: 2010-09-14 Tue +#+DATE #+EMAIL: info@fossee.in -# \author[FOSSEE] {FOSSEE} +#+DESCRIPTION: +#+KEYWORDS: +#+LANGUAGE: en +#+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t +#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc + + +* Outline + - Doing statistical operations in Python + - Summing set of numbers + - Finding there mean + - Finding there Median + - Finding there Standard Deviation + +* Data set + - A;015163;JOSEPH RAJ S;083;042;47;00;72;244;;; -# \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} -# \date{} + The following are the fields in any given line. + - Region Code which is 'A' + - Roll Number 015163 + - Name JOSEPH RAJ S + - Marks of 5 subjects: -- English 083 -- + Hindi 042 -- Maths 47 -- + Science 35 -- Social 72 + - Total marks 244 -* Tutorial Plan -** Doing simple statistical operations in Python -** Using loadtxt to solve statistics problem +* Question + - In the given file football.txt at path /home/fossee/football.txt , + one column is player name,second is goals at home + and third goals away. + - Find the total goals for each player + - Mean home and away goals + - Standard deviation of home and away goals + +* Solution +#+begin_src python + L=loadtxt('/home/amit/football.txt',usecols=(1,2), + delimiter=',') + sum(L,1) + mean(L,0) + std(L,0) +#+end_src python * Summary -** seq=[1,5,6,8,1,3,4,5] -** sum(seq) -** mean(seq) -** median(seq) -** std(seq) + - sum + - mean + - median + - std -* Summary - -** loadtxt