author | bhanu |
Mon, 15 Nov 2010 15:00:34 +0530 | |
changeset 503 | a858141ad884 |
parent 450 | d49aee7ab1b9 |
permissions | -rw-r--r-- |
321 | 1 |
#+LaTeX_CLASS: beamer |
2 |
#+LaTeX_CLASS_OPTIONS: [presentation] |
|
3 |
#+BEAMER_FRAME_LEVEL: 1 |
|
4 |
||
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
5 |
#+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent} |
321 | 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 |
|
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
8 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
9 |
#+LaTeX_CLASS: beamer |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
10 |
#+LaTeX_CLASS_OPTIONS: [presentation] |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
11 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
12 |
#+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl} |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
13 |
#+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
14 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
15 |
#+LaTeX_HEADER: \usepackage{listings} |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
16 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
17 |
#+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries, |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
18 |
#+LaTeX_HEADER: commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
19 |
#+LaTeX_HEADER: showstringspaces=false, keywordstyle=\color{blue}\bfseries} |
321 | 20 |
|
21 |
#+TITLE: Statistics |
|
22 |
#+AUTHOR: FOSSEE |
|
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
23 |
#+DATE |
321 | 24 |
#+EMAIL: info@fossee.in |
25 |
||
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
26 |
#+DESCRIPTION: |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
27 |
#+KEYWORDS: |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
28 |
#+LANGUAGE: en |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
29 |
#+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
30 |
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
31 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
32 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
33 |
* Outline |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
34 |
- Doing statistical operations in Python |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
35 |
- Summing set of numbers |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
36 |
- Finding there mean |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
37 |
- Finding there Median |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
38 |
- Finding there Standard Deviation |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
39 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
40 |
* Data set |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
41 |
- A;015163;JOSEPH RAJ S;083;042;47;00;72;244;;; |
321 | 42 |
|
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
43 |
The following are the fields in any given line. |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
44 |
- Region Code which is 'A' |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
45 |
- Roll Number 015163 |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
46 |
- Name JOSEPH RAJ S |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
47 |
- Marks of 5 subjects: -- English 083 -- |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
48 |
Hindi 042 -- Maths 47 -- |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
49 |
Science 35 -- Social 72 |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
50 |
- Total marks 244 |
321 | 51 |
|
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
52 |
* Question |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
53 |
- In the given file football.txt at path /home/fossee/football.txt , |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
54 |
one column is player name,second is goals at home |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
55 |
and third goals away. |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
56 |
- Find the total goals for each player |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
57 |
- Mean home and away goals |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
58 |
- Standard deviation of home and away goals |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
59 |
|
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
60 |
* Solution |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
61 |
#+begin_src python |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
62 |
L=loadtxt('/home/amit/football.txt',usecols=(1,2), |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
63 |
delimiter=',') |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
64 |
sum(L,1) |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
65 |
mean(L,0) |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
66 |
std(L,0) |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
67 |
#+end_src python |
321 | 68 |
|
69 |
* Summary |
|
450
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
70 |
- sum |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
71 |
- mean |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
72 |
- median |
d49aee7ab1b9
Rewrite of statistics script as suggested by punch and change in slides accordingly
Amit Sethi
parents:
321
diff
changeset
|
73 |
- std |
321 | 74 |