BarChart y 1, y 2, makes a bar chart with bar lengths y 1, y 2,.

Σχετικά έγγραφα
Εργαστήριο 4. Άóêçóç 1. Άóêçóç 2. Χημικοί. Plot Sec x, x, 2 π, 2π. p1 Plot Abs 1 Abs x, x, 3, 3. 1 In[3]:= f x_ : 2 π. p2 Plot f x, x, 3,

Histogram list, 11 RANDOM NUMBERS & HISTOGRAMS. r : RandomReal. ri : RandomInteger. rd : RandomInteger 1, 6

Biostatistics for Health Sciences Review Sheet

ST5224: Advanced Statistical Theory II

Aquinas College. Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET

5.4 The Poisson Distribution.

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

Statistical Inference I Locally most powerful tests

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review

Solution Series 9. i=1 x i and i=1 x i.

Areas and Lengths in Polar Coordinates

Areas and Lengths in Polar Coordinates

APPENDICES APPENDIX A. STATISTICAL TABLES AND CHARTS 651 APPENDIX B. BIBLIOGRAPHY 677 APPENDIX C. ANSWERS TO SELECTED EXERCISES 679

Πανεπιστήμιο Κρήτης, Τμήμα Επιστήμης Υπολογιστών Άνοιξη HΥ463 - Συστήματα Ανάκτησης Πληροφοριών Information Retrieval (IR) Systems

Math221: HW# 1 solutions

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Statistics & Research methods. Athanasios Papaioannou University of Thessaly Dept. of PE & Sport Science

Math 6 SL Probability Distributions Practice Test Mark Scheme

C.S. 430 Assignment 6, Sample Solutions

Elements of Information Theory

Other Test Constructions: Likelihood Ratio & Bayes Tests

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

An Inventory of Continuous Distributions

Μηχανική Μάθηση Hypothesis Testing

Gaussian related distributions

Example Sheet 3 Solutions

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

2 Composition. Invertible Mappings

Fundamentals of Probability: A First Course. Anirban DasGupta

Homework 3 Solutions

Q1a. HeavisideTheta x. Plot f, x, Pi, Pi. Simplify, n Integers

HW 3 Solutions 1. a) I use the auto.arima R function to search over models using AIC and decide on an ARMA(3,1)

Matrices and Determinants

Chap. 13. Exercise A few exercises from Chap. 13. n = 89; c = 2; OC B [p_] = CDF[BinomialDistribution[n, p], c];

Exercises to Statistics of Material Fatigue No. 5

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

Inverse trigonometric functions & General Solution of Trigonometric Equations

Every set of first-order formulas is equivalent to an independent set

Finite Field Problems: Solutions

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM


Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

ΠΑΝΔΠΗΣΖΜΗΟ ΠΑΣΡΩΝ ΣΜΖΜΑ ΖΛΔΚΣΡΟΛΟΓΩΝ ΜΖΥΑΝΗΚΩΝ ΚΑΗ ΣΔΥΝΟΛΟΓΗΑ ΤΠΟΛΟΓΗΣΩΝ ΣΟΜΔΑ ΤΣΖΜΑΣΩΝ ΖΛΔΚΣΡΗΚΖ ΔΝΔΡΓΔΗΑ

EE512: Error Control Coding

From the finite to the transfinite: Λµ-terms and streams

FORMULAS FOR STATISTICS 1

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι

Uniform Convergence of Fourier Series Michael Taylor

Υπολογιστική Φυσική Στοιχειωδών Σωματιδίων

Section 8.3 Trigonometric Equations

CRASH COURSE IN PRECALCULUS

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

The Simply Typed Lambda Calculus

Tridiagonal matrices. Gérard MEURANT. October, 2008

Supplementary Appendix

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Homework for 1/27 Due 2/5

«ΑΝΑΠΣΤΞΖ ΓΠ ΚΑΗ ΥΩΡΗΚΖ ΑΝΑΛΤΖ ΜΔΣΔΩΡΟΛΟΓΗΚΩΝ ΓΔΓΟΜΔΝΩΝ ΣΟΝ ΔΛΛΑΓΗΚΟ ΥΩΡΟ»

Λογισμικά για Στατιστική Ανάλυση. Minitab, R (ελεύθερο λογισμικό), Sas, S-Plus, Stata, StatGraphics, Mathematica (εξειδικευμένο λογισμικό για

DERIVATION OF MILES EQUATION FOR AN APPLIED FORCE Revision C

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Kάθε γνήσιο αντίτυπο φέρει την υπογραφή του συγγραφέα. Copyright: Δαφέρμος Βασίλης, Eκδόσεις Zήτη, Μάϊος 2005, Θεσσαλονίκη

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

About these lecture notes. Simply Typed λ-calculus. Types

( ) 2 and compare to M.

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Lecture 21: Properties and robustness of LSE

Démographie spatiale/spatial Demography


derivation of the Laplacian from rectangular to spherical coordinates

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

Probability and Random Processes (Part II)

Srednicki Chapter 55

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Approximation of distance between locations on earth given by latitude and longitude

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Queensland University of Technology Transport Data Analysis and Modeling Methodologies

Congruence Classes of Invertible Matrices of Order 3 over F 2

If we restrict the domain of y = sin x to [ π 2, π 2

519.22(07.07) 78 : ( ) /.. ; c (07.07) , , 2008

Numerical Analysis FMN011

Precision Metal Film Fixed Resistor Axial Leaded

1. A fully continuous 20-payment years, 30-year term life insurance of 2000 is issued to (35). You are given n A 1

Example of the Baum-Welch Algorithm

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Reminders: linear functions

Capacitors - Capacitance, Charge and Potential Difference

The Probabilistic Method - Probabilistic Techniques. Lecture 7: The Janson Inequality

Transcript:

In[]:= In[]:= In[3]:= In[4]:= In[5]:= Out[5]= r : Random ri : Random Integer rdice : Random Integer,, 6 disp : Export "t.ps",, "EPS" & list Table rdice, 0 5,, 4, 6,, 3,, 3, 4,, 6, 4, 6,,, 6, 6,, 3, In[6]:= In[7]:= Statistics`DataManipulation` General::obspkg : Statistics`DataManipulation` is now obsolete. The legacy version being loaded may conflict with current Mathematica functionality. See the Compatibility Guide for updating information. In[8]:= In[9]:= Out[9]= fr : Frequencies & fr list 5,, 3,, 3, 3, 3, 4,, 5, 5, 6 In[0]:=? BarChart BarChart y, y, makes a bar chart with bar lengths y, y,. BarChart, w i y i,,, w j y j,, makes a bar chart with bar features defined by the symbolic wrappers w k. BarChart data, data, makes a bar chart from multiple datasets data i. In[]:= Graphics`Graphics` General::obspkg : Graphics`Graphics` is now obsolete. The legacy version being loaded may conflict with current Mathematica functionality. See the Compatibility Guide for updating information. Histogram::shdw : Symbol Histogram appears in multiple contexts Graphics`Graphics`, System` ; definitions in context Graphics`Graphics` may shadow or be shadowed by other definitions. BarChart::shdw : Symbol BarChart appears in multiple contexts Graphics`Graphics`, System` ; definitions in context Graphics`Graphics` may shadow or be shadowed by other definitions. BarSpacing::shdw : Symbol BarSpacing appears in multiple contexts Graphics`Graphics`, System` ; definitions in context Graphics`Graphics` may shadow or be shadowed by other definitions. PieChart::shdw : Symbol PieChart appears in multiple contexts Graphics`Graphics`, System` ; definitions in context Graphics`Graphics` may shadow or be shadowed by other definitions.

new688_probab.nb In[]:= BarChart fr list histogram 5 4 3 Out[]= 0 In[3]:= Out[3]= In[4]:= In[5]:= Out[5]= In[6]:= Mean list standard 67 0 mymean list_ : Plus list Length list mymean list 67 0 StandardDeviation list N Out[6]=.95408 In[7]:= Out[7]= In[8]:= Variance list 45 380 Sqrt N Out[8]=.95408 In[9]:= In[0]:= Out[0]= In[]:= Out[]= In[]:= In[3]:= Out[3]= Sample Space Timing list Table rdice, 00 000 ; 0.047, Null Union list sample space all distinct possibilities,, 3, 4, 5, 6,,...6 "simple events", any combinations "events" list, 4, 6, 8 ; list Table i, i, 5,, 3, 4, 5

new688_probab.nb 3 In[4]:= Out[4]= In[5]:= Out[5]= In[6]:= Out[6]= In[7]:= Out[7]= In[8]:= Out[8]= In[9]:= Out[9]= In[30]:= Out[30]= In[3]:= Out[3]= list list,, 3, 4, 5, 6, 8 or Union list, list,, 3, 4, 5, 6, 8 Join list, list, 4, 6, 8,,, 3, 4, 5 Intersection list, list, 4 or list list, 4 allist Table i, i, 0,, 3, 4, 5, 6, 7, 8, 9, 0 Complement allist, list, 3, 5, 7, 9, 0 Complement allist, list, list 7, 9, 0 In[3]:= PROBABILTY sec. 4.3 in KR. In[33]:= In[34]:= In[35]:= consider rolling of dice; "simple events" are,3,.., roll : rdice rdice roll a single "experiment Out[35]= 9 In[36]:= In[37]:= Out[37]= In[38]:= Out[38]= now try MANY experiments Timing list Table roll, 000 000 ;.96, Null Timing flist fr list 0.5, 8 078,, 55 4, 3, 83 734, 4, 468, 5, 38 36, 6, 66 56, 7, 38 656, 8, 80, 9, 83 055, 0, 55 303,, 7 8,

4 new688_probab.nb In[39]:= BarChart flist 50 000 00 000 Out[39]= 50 000 0 In[40]:= ll Length list N Out[40]=. 0 6 In[4]:= Out[4]= In[4]:= fflist Table flist i, ll, flist i, N, i, 0.08078,., 0.0554, 3., 0.083734, 4., 0.468, 5., 0.3836, 6., 0.6656, 7., 0.38656, 8., 0.8, 9., 0.083055, 0., 0.055303,., 0.078,. BarChart fflist, BarStyle Blue 0.5 0.0 Out[4]= 0.05 0.00 In[43]:= In[44]:= Out[44]= In[45]:= Out[45]= note "lucky seven" fflist N 0.08078,., 0.0554, 3., 0.083734, 4., 0.468, 5., 0.3836, 6., 0.6656, 7., 0.38656, 8., 0.8, 9., 0.083055, 0., 0.055303,., 0.078,. exact Table i 36., i, i, 6 exact probabilites 0.077778,, 0.0555556, 3, 0.0833333, 4, 0., 5, 0.38889, 6, 0.66667, 7

new688_probab.nb 5 In[46]:= Out[46]= In[47]:= Table fflist i, exact i,, i, 6 0.00808, 0.00404, 0.004808, 0.003, 0.005408, 0.000844 Note: error is small, although we had a million tries statistical experiments converge slowly to exact probabilities In[48]:= In[49]:= In[50]:= Out[50]= In[5]:= Out[5]= In[5]:= Permutations Permutations a, b, c a, b, c, a, c, b, b, a, c, b, c, a, c, a, b, c, b, a Binomial n, m Binomial n, m n m n m FullSimplify Out[5]= 0 In[53]:= In[54]:= Factorial n Gamma n FullSimplify Out[54]= 0 In[55]:= Series n, n, Infinity, Stirling formula Out[55]= Log n n O n Π n 6 Π n O 3 n In[56]:= stir n_ n n n Π n Out[56]= n n n n Π In[57]:= stir 00. Out[57]= 9.3485 0 57 In[58]:= 00 N Out[58]= 9.336 0 57 In[59]:= In[60]:= In[6]:= cummulativeprobability function cumprob n_ : Sum fflist i,, i, n N 36 cumprob Out[6]=.008

6 new688_probab.nb In[6]:= Plot cumprob n, n,,, PlotStyle Blue, AxesLabel "n", "F" 0.8 0.6 Out[6]= 0.4 0. In[63]:= In[64]:= In[65]:= mean list_ : Sum list i, list i,, i, Length list mean fflist N again, "lucky 7" Out[65]= 6.99736 In[66]:= In[67]:= var list_ : Block Μ mean list, Sum list i, Μ ^ list i,, i, Length list var fflist N Out[67]= 5.83985 In[68]:= fcoin, 0,, Out[68]=, 0,, In[69]:= Out[69]= In[70]:= Out[70]= mean fcoin var fcoin 4 In[7]:= In[7]:= In[73]:= approximation by a Gauss distribution gauss list_ : Block Μ mean list, Σ Sqrt var list, Σ Sqrt Pi Exp x Μ Σ ^

new688_probab.nb 7 In[74]:= Out[74]= gauss fflist N 0.085687 6.99736 x 0.65086 In[75]:= In[76]:= In[77]:= In[78]:= In[79]:= mybarplot list_ : Graphics Red, Table Line list i,, 0, list i,, list i,, i, Length list Show mybarplot fflist, AspectRatio Out[79]= In[80]:= Show Plot gauss fflist, x, 0,, mybarplot fflist 0.5 0.0 Out[80]= 0.05 In[8]:= binlist n_, p_ : Table Binomial n, m p ^m p ^ n m, m, m, 0, n

8 new688_probab.nb In[8]:= binlist 3, Out[8]= 8, 0, 3 8,, 3 8,, 8, 3 In[83]:= In[84]:= longbin binlist 0, ; mean longbin Out[84]= 0 In[85]:= Show Plot gauss longbin, x, 0, 0, mybarplot longbin 0.5 Out[85]= 0.0 0.05 In[86]:= In[87]:= biasbin binlist 0,.3 ; Show Plot gauss biasbin, x, 0, 0, mybarplot biasbin, PlotRange 0,. 0.0 0.5 Out[87]= 0.0 0.05 In[88]:= biasbin binlist 3,.6 ;

new688_probab.nb 9 In[89]:= Show Plot gauss biasbin, x,, 5, mybarplot biasbin, PlotRange 0,.6 0.5 0.4 Out[89]= 0.3 0. 0. In[90]:= In[9]:= Out[9]= In[9]:= Out[9]= In[93]:= Out[93]= In[94]:= Out[94]= In[95]:= Central limittheorem: we already verified that the discrete "binary distribution" 0, for a random variable X which is NON Gaussian will lead to a Gaussian for a random variable Z, which is a sum of of n elements Z X... X for a large n. We will now try a different, continuous uniformdistribution but with the same mean and average as the "binary one" f x_ L L Integrate f x, x, a, a i.e. a L for the same average and normalization a L Integrate f x x, x, L, L mean Integrate f x x ^, x, L, L L Solve 4, L this gives the spread with varianve of 4 Out[95]= L 3, L 3 In[96]:= a Sqrt 3 N; b Sqrt 3 N Out[96]=.36603 In[97]:= rr : Random Real, a, b

0 new688_probab.nb In[98]:= Table rr, 0 Out[98]= 0.86909, 0.90073, 0.83669, 0.6334, 0.66985, 0.647097, 0.3964, 0.96767, 0.396, 0.763 In[99]:= Clear sumn ; sumn n_ : Sum rr, n In[00]:= In[0]:= In[0]:= In[03]:= Out[03]= In[04]:= Do aa i 0, i, 00 ; run : Block s Floor sumn 00, aa s aa s Timing Do run, 0 000 ;.8, Null listaa Table aa i, i, 00 Out[04]= 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,, 5, 4, 4, 39, 67, 95, 38, 00, 39, 340, 480, 53, 593, 679, 749, 796, 807, 795, 70, 59, 5, 4, 393, 55, 86, 30, 97, 5, 3, 8, 3, 5, 0,, 0, 0, 0,, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 In[05]:= In[06]:= In[07]:= Out[07]= In[08]:= normal x_ : Sqrt 00 4 Sqrt Pi Exp x 50 Sqrt 00 4 ^ normal x 50 99 x 5 Π Integrate normal x, x, Infinity, Infinity Out[08]= In[09]:= In[0]:= plolist : ListPlot listaa 0 000, PlotStyle Blue, PointSize.05 plonorm : Plot normal x, x, 0, 00, PlotStyle Red

new688_probab.nb In[]:= Show plolist, plonorm, PlotRange 0, 80, 0,., AxesOrigin 0, 0 0.0 0.08 0.06 Out[]= 0.04 0.0 0.00 In[]:= In[3]:= more on normal distribution In[4]:= cumul z_ Sqrt Pi Integrate Exp u^, u, Infinity, z Out[4]= In[5]:= Erf z cumul Infinity Out[5]= In[6]:= Plot Sqrt Pi Exp z ^, cumul z, z, 3, 3, PlotStyle Red, Blue 0.8 0.6 Out[6]= 0.4 0. 3 In[7]:= Out[7]= FindRoot cumul z, z, Chop z 0

new688_probab.nb In[8]:= Out[8]= FindRoot cumul z 0.9, z, z.855 In[9]:= In[0]:= In[]:= Gauss from binomial cgaus m_, n_ : stir n stir m stir n m ^ n cgaus n x, n Out[]= Π n x n n x n x n n n n x n n n x n n x n x n x n x In[]:= Sqrt n. x y Sqrt n Out[]= Π n n n y n n y n n y n n 3 n n n y n n y n n y n n n y n n n y n n n y In[3]:= FullSimplify, Assumptions n 0 && y 0 Out[3]= n n n n y n n n Π Π y n n y n y In[4]:= Limit, n Infinity Out[4]= In[5]:= y Π this is the gauss distribution In[6]:= Gammaand chi^ distributions In[7]:= Out[7]= In[8]:= fgam x_, t_ lamexp lam x lam x ^ t Gamma t lam x lam lam x t Gamma t Integrate fgam x, t, x, 0, Infinity, Assumptions t 0 && lam 0 Out[8]= In[9]:= Out[9]= Integrate x fgam x, t, x, 0, Infinity, Assumptions t 0 && lam 0 average t lam

new688_probab.nb 3 In[30]:= Out[30]= In[3]:= Integrate x ^ fgam x, t, x, 0, Infinity, Assumptions t 0 && lam 0 variance t lam chi x_, n_ fgam x, n. lam Out[3]= In[3]:= n x x n Gamma n Plot chi x, 5, chi x, 0, x, 0, 0, PlotStyle Red, Blue, PlotRange 0,. 0.0 0.5 Out[3]= 0.0 0.05