.. title: Engineering Probability Class 13 Thurs 2018-03-01
.. slug: class13
.. date: 2018-03-01
.. tags: mathjax
.. category: class
.. link: 
.. description: 
.. type: text

.. sectnum::
.. contents:: Table of contents
..


Exam 1 answers
--------------

are now online.

We gave full points even if you didn't finish the arithmetic to compute a number.   In the real world, you have computers.    Also, in the real world, accurate analysis and computation matter.   In 1954, physicists made an eensy teensy error designing `Castle Bravo <https://en.wikipedia.org/wiki/Castle_Bravo>`_.

Homework 6
----------

online, due in one week (i.e., Thurs).

Notation
--------

How to parse $F_X(x)$

#. Uppercase F means that this is a cdf.   Different letters may indicate different distributions. 

#. The subscript X is the name of the random variable.

#. The x is an argument, i.e., an input.

#. $F_X(x)$ returns the probability that the random variable is less or equal to the value x, i.e. prob(X<=x).
   
   

Matlab
------

#. Matlab

   #. Major functions::

	cdf(dist,X,A,...)
	pdf(dist,X,A,...) 

   #. Common cases of dist (there are many others)::

	'Binomial'
	'Exponential'
	'Poisson'
	'Normal'
	'Geometric'
	'Uniform'
	'Discrete Uniform' 

   #. Examples::

	pdf('Normal',-2:2,0,1)
	cdf('Normal',-2:2,0,1)

	p=0.2
	n=10
	k=0:10
	bp=pdf('Binomial',k,n,p)
	bar(k,bp)
	grid on

	bc=cdf('Binomial',k,n,p)
	bar(k,bc)
	grid on

	x=-3:.2:3
	np=pdf('Normal',x,0,1)
	plot(x,np)

   #. Interactive GUI to explore distributions:  disttool
   #. Random numbers::

	rand(3)
	rand(1,5)
	randn(1,10)
	randn(1,10)*100+500
	randi(100,4)

   #. Interactive GUI to explore random numbers:  randtool
   #. Plotting two things at once::

	x=-3:.2:3
	n1=pdf('Normal',x,0,1)
	n2=pdf('Normal',x,0,2)
	plot(x,n1,n2)
	plot(x,n1,x,n2)
	plot(x,n1,'--r',x,n2,'.g')

#. Use Matlab to compute a geometric pdf w/o using the builtin function.


Text ctd
--------

#. Section 4.2.1 page 150.


Material added after class
--------------------------

#. `My handwritten tablet notes <../../handwritten/301.pdf>`_.   
