Difference between revisions of "TF ErrAna Homework"

From New IAC Wiki
Jump to navigation Jump to search
 
(87 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
=Errors=
 
=Errors=
  
== Give examples of 5 a  Systematic error.==
+
== Give 5 examples of different type of Systematic error.==
  
 
==Find 3 published examples of data which is wrongly represented.  ==
 
==Find 3 published examples of data which is wrongly represented.  ==
Identify what is incorrect about it.  What does it mean to be wrongly presented?  A typical example is a political poll which does not identify the statistical uncertainty properly or at all.
+
hand in a copy of the example.  Identify what is incorrect about it.  What does it mean to be wrongly presented?  A typical example is a political poll which does not identify the statistical uncertainty properly or at all.
  
 
==Create a Histogram using ROOT==
 
==Create a Histogram using ROOT==
Line 82: Line 82:
 
:<math>P(r) = Cr^2 \exp^{-2 \frac{r}{R}}</math>  
 
:<math>P(r) = Cr^2 \exp^{-2 \frac{r}{R}}</math>  
  
Doing the integrals by hand (no tables) ,
+
Doing the integrals by hand (no tables or software that performs integrals) ,
 +
 
 
a.)Find the value of C
 
a.)Find the value of C
  
Line 118: Line 119:
 
a.) calculate the mean and standard deviation
 
a.) calculate the mean and standard deviation
  
b.) construct a histogram by hand which has 10 bins centered on 10,20,...
+
b.) construct a histogram by hand which has 10 bins from 0 to 100 and centered on 10,20,...
  
c.) Use ROOT to construct a histogram.  Compare the mean from ROOT with your result in part a above.
+
c.) Use ROOT to construct a histogram.  Compare the mean and RMS from ROOT with your result in part (a) above. What is the difference between the RMS report in the ROOT histogram and the standard deviation you calculated in part (a)?
  
== Variance usng Probability function==
+
== Variance using Probability function==
  
 
Given that  
 
Given that  
: <math>\sigma^2 = \sum_{j=1}^n \left [ \left (x_j - \mu \right)^2 P(x)j) \right ]</math>
+
: <math>\sigma^2 = \lim_{N \rightarrow \infty} \frac{1}{N}\sum_{j=1}^n \left [ \left (x_j - \mu \right)^2) \right ]</math>
 +
 
 +
Justify that
 +
 
 +
<math>\lim_{N \rightarrow \infty} \frac{1}{N}\sum_{j=1}^n \left [ \left (x_j - \mu \right)^2  \right ] = \lim_{N \rightarrow \infty} \left [  \frac{1}{N}\sum_{j=1}^n x_j^2\right ] - \mu^2</math>
 +
 
 +
 
 +
;Note:The standard deviation (<math>\sigma</math>) is the root mean square (RMS) of the deviations.
 +
 
 +
RMS = <math>\sqrt{\frac{1}{N}\sum_i^N x_i^2}</math> so <math>\sigma = \mbox{RMS}(x_i -\mu)</math>
 +
 
 +
=Binomial Probability Distributions=
 +
1.)Evaluate the following (at least one by hand)
 +
 +
 
 +
a.) <math>{6\choose 3}</math>
 +
 
 +
b.) <math>{4\choose 2}</math>
 +
 
 +
c.) <math>{10\choose 3}</math>
 +
 
 +
d.) <math>{52\choose 4}</math>
 +
 
 +
 
 +
 
 +
2.) Plot the binomial distribution P(x) for n=6 and p=1/2 from x=0 to 6.
 +
 
 +
:<math>P(x) = {n\choose x}p^{x}q^{n-x} </math>
 +
 
 +
 
 +
3.)  Given the probability distribution below for the sum of the point on a pair of dice
 +
 
 +
 
 +
:<math>P(x) =\left \{  {\frac{x-1}{36} \;\;\;\; 2 \le x \le 7 \atop \frac{13-x}{36} \;\;\; 7 < x \le 12} \right .</math>
 +
 
 +
 
 +
a.) find the mean
 +
 
 +
b.) find the standard deviation <math>(\sigma)</math>
 +
 
 +
 
 +
4.) Prove that <math>\sigma^2 = npq</math> for the Binomial distribution.
 +
 
 +
=Poisson Prob Dist=
 +
 
 +
==Variance==
 +
 
 +
Show that <math>\sigma^2 = \mu</math> for the Poisson Distribution starting with the definition of variance.
 +
 
 +
==Binomial/Poisson Statistic==
 +
The probability that a student will fail this course is 7.3%.
 +
 
 +
a.) Calculate by hand (i.e. without a computer/calculator)  the expected number of students that will fail this course if there are 32 enrolled?
 +
 
 +
b.) Calculate by hand the probability that 5 or more will fail in one semester.
 +
 
 +
== Deadtime==
 +
 
 +
In a counting experiment it is possible for a detector to be "too busy" recording the effects of a detected particle that it is unable to measure another particle traversing the detector during the short time interval.  "Dead time" is a measure of the time interval over  which your detector is unable to make a measurement because it is currently making a measurement.
 +
 
 +
Assume that particle hit your detector at a rate of <math>1 \times 10^6</math> particles/sec and that your detector has a deadtime of 200 ns <math>(200 \times 10^{-9} sec)</math>.  The mean number of particles hitting the detector during this deadtime is <math>\mu = 0.2</math>.  The detector efficiency is defined as
 +
 
 +
:<math>\epsilon = \frac{\mbox{average number of particles counted}}{\mbox{number of particles passing through the detector in 200 ns}}</math>
 +
 
 +
a.)  Find the efficiency of the detector assuming the process follows the Poisson distribution.
 +
 
 +
b.) Graph the efficiency as a function of the incident particle flux for rates between 0 and <math>10 \times 10^6</math> particles/sec.
 +
 
 +
= Gaussian Prob Dist=
 +
== Counting experiment variance==
 +
 
 +
a.)What is the standard deviation for a counting experiment with a mean number of counts <math>\mu</math> = 100.
 +
 
 +
b.)What is the standard deviation if you repeat the above counting experiment ten times?
 +
 
 +
== Half Width -vs- variance==
 +
Show that the full-width at half maximum <math>(\Gamma)</math> is related to the standard devision by <math>\Gamma = 2.3548 \sigma</math>  for the Gaussian probability distribution.  Begin with the definition that
 +
 
 +
:<math>P_G\left (\mu + \frac{\Gamma}{2} \right ) = \frac{P_G(\mu)}{2}</math>
 +
 
 +
== Gaussian Probability==
 +
a.) Determine, by direct integration, the probability  of observing a value beyond 1 standard deviation from the mean of a Gaussian distribution? ie: <math>P_G(X \le \mu - \sigma, \mu, \sigma)+ P_G(X \ge \mu + \sigma, \mu, \sigma)</math> =?
  
Show that
+
'''Grad students do parts b & c below:'''
  
<math>\sum_{j=1}^n \left [ \left (x_j - \mu \right)^2 P(x_j) \right ] = \sum_{j=1}^n \left [ x_j^2 - P(x_j) \right ] - \mu^2</math>
+
b.) Find the value of <math>A</math> such that <math>P_G(\mu + \sigma, \mu, \sigma) = A P_G(\mu,\mu,\sigma)</math>.
  
=Probability Distributions=
+
c.) repeat parts a.) and b.) above for <math>P_G(\mu + P.E., \mu, \sigma)</math> and <math>P_G(\mu + \Gamma/2, \mu, \sigma)</math>
 +
 
 +
 
 +
<math>P_G(X =\mu + \sigma, \mu, \sigma)=0.24197 = 0.60653 P_G(X = \mu , \mu, \sigma)</math>
 +
 
 +
<math>P_G(X =\mu + PE, \mu, \sigma)=0.3178 = 0.7965 P_G(X = \mu , \mu, \sigma)</math>
 +
 
 +
<math>P_G(X =\mu - \Gamma/2, \mu, \sigma)=0.19947 = 0.5 P_G(X = \mu , \mu, \sigma)</math>
  
 
=Error Propagation=
 
=Error Propagation=
 +
==Lorentzian==
 +
 +
a.)What fraction of the area of a Lorentzian curve is enclosed within the interval <math>(\mu \pm \frac{3}{2} \Gamma)</math>?
 +
 +
b.) The probability of observing a value from the Lorentzian distribution that is more than 2 half-widths (<math>\Gamma/2</math>) from the mean.
 +
 +
== Derivatives==
 +
 +
Find the uncertainty <math>\sigma_x</math> in <math>x</math> as a function of the uncertainties<math> \sigma_u</math> and <math>\sigma_v</math> in <math>u</math> and <math>v</math> for the following functions:
 +
 +
a.) <math>x = \frac{1}{2(u-v)}</math>
 +
 +
b.) <math>x= uv^2</math>
 +
 +
c.) <math>x = u^2 + v^2</math>
 +
 +
d.) <math>x = \frac{u-v}{u+v}</math>
 +
 +
 +
== Snell's Law==
 +
 +
Given Snell's Law
 +
 +
: <math>n_1 \sin(\theta_1) = n_2 \sin(\theta_2)</math>
 +
 +
Assume <math>n_1=1</math> is known with absolute certainty and find <math>n_2</math> and it's uncertainty when the following angles are measured
 +
 +
:<math>\theta_1 = (22.03 \pm 0.02)^{\circ}</math>
 +
:<math>\theta_2 = (14.45 \pm 0.2)^{\circ}</math>
 +
 +
 +
=Linear Fit=
 +
 +
==2 Eq. 2 unknowns==
 +
Determine <math>x</math> & <math>y</math> for the system below using either Kramer's Rule or Matrix inversion
 +
 +
:<math>7x + 8y =100</math>
 +
:<math>2x-9y = 10</math>
 +
 +
==3 Eq. 3 unknowns==
 +
 +
Given the system of 3 Equations and 3 Unkowns:
 +
 +
:<math>a_{11}x + a_{12}y + a_{13}z = A</math>
 +
:<math>a_{21}x + a_{22}y +a_{23}z= B</math>
 +
:<math>a_{31}x + a_{32}y +a_{33}z= C</math>
 +
 +
or in matrix form
 +
 +
:<math>\left( \begin{array}{ccc} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{array} \right)\left( \begin{array}{c} x \\ y  \\z\end{array} \right)= \left( \begin{array}{c} A \\ B \\C \end{array} \right) </math>
 +
 +
 +
a.)Express a the solution for x,y, and z in matrix form assuming the remaining terms in the above are known (<math>A,B,C</math> and <math>a_{ij}</math> are known)
 +
 +
 +
 +
b.) Find expressions for x,y, and z in terms of A,B,C when
 +
 +
:<math>x + y -z = A</math>
 +
:<math>z= B</math>
 +
:<math>2x + y +2z= C</math>
 +
 +
== Linear Data Fit==
 +
 +
A metal rod is placed with its ends in two different temperature baths.  One bath is at zero degree Celsius and the other at 100.  The temperature along the rod is measure and given in the table below.
 +
 +
{| border="1"  |cellpadding="20" cellspacing="0
 +
|-
 +
| Trial || Position (cm) ||Temperature (Celsius)
 +
|-
 +
|1 ||1.0||15.6
 +
|-
 +
|2 || 2.0 || 17.5
 +
|-
 +
|3 || 3.0|| 36.6
 +
|-
 +
|4 || 4.0 || 43.8
 +
|-
 +
|5 || 5.0 || 58.2
 +
|-
 +
|6 || 6.0 ||61.6
 +
|-
 +
|7 || 7.0 || 64.2
 +
|-
 +
|8 || 8.0 || 70.4
 +
|-
 +
|9 || 9.0 || 98.8
 +
|}
 +
 +
a.) Using the program developed in Lab 10, fit the above data assuming a linear function
 +
T = A + B X
 +
 +
assuming all of the data has the same uncertainty.  Report the value of A & B and the uncertainty in the parameters.
 +
 +
b.) repeat part a.) above except this time assume each data point has an uncertainty given by the Poisson distribution as:
 +
 +
<math>\sigma_i^2 \approx T_i</math>.
 +
 +
= Polynomial Least Squares Fit=
 +
 +
==Matrix Inversion==
 +
 +
Use the Gauss-Jordan method to find the inverse matrix <math>\tilde{A}^{-1}</math>  '''by hand''' given
 +
 +
:<math> \tilde{A} =
 +
\begin{bmatrix}
 +
2 & -1 & 0\\
 +
-1 & 2 & -1 \\
 +
0 & -1 & 2
 +
\end{bmatrix}.
 +
</math>
 +
 +
==Poly Fit using ROOT==
 +
 +
Hand in your source code and graphs for Lab 13
 +
 +
= Polynomial Least Squares Fit=
 +
 +
 +
Perform a least squares fit to the data in Lab 14 using the Grid search method from
 +
[http://wiki.iac.isu.edu/index.php/TF_ErrAna_InClassLab#Lab_16 Lab 16].
 +
 +
This will be a way to check your grid search algorithm against a known solution.  Use the Temp -vs- Voltage data and the Linear function in Lab 13 above.
 +
 +
Hand in your source code in ROOT and a graph showing the linear fit with the Grid search parameters and the parameters found through Matrix inversion.
  
 
[http://wiki.iac.isu.edu/index.php/Forest_Error_Analysis_for_the_Physical_Sciences] [[Forest_Error_Analysis_for_the_Physical_Sciences]]
 
[http://wiki.iac.isu.edu/index.php/Forest_Error_Analysis_for_the_Physical_Sciences] [[Forest_Error_Analysis_for_the_Physical_Sciences]]

Latest revision as of 21:47, 19 February 2020

Errors

Give 5 examples of a different type of Systematic error.

Find 3 published examples of data which is wrongly represented.

hand in a copy of the example. Identify what is incorrect about it. What does it mean to be wrongly presented? A typical example is a political poll which does not identify the statistical uncertainty properly or at all.

Create a Histogram using ROOT

some commands that may interest you


root [1] TH1F *Hist1=new TH1F("Hist1","Hist1",50,-0.5,49.5);
root [2] Hist1->Fill(10);
root [3] Hist1->Draw();

You can use the above commands but you need to change the names and numbers above to receive credit. You must also add a title to the histogram which contains your full name. You will printout the histogram and hand it in with the above two problems.

Notice how the square rectangle in the histogram is centered at 10!
Notice that if you do the commands
root [2] Hist1->Fill(10);
root [3] Hist1->Draw();

the rectangle centered a 10 will reach the value of 2 on the vertical axis.

Two dice are rolled 20 times. Create a histogram to represent the 20 trials below

Trial Value
1 8
2 10
3 9
4 5
5 9
6 6
7 5
8 6
9 3
10 9
11 8
12 5
13 8
14 10
15 8
16 11
17 12
18 6
19 7
20 8

Mean and SD

Electron radius

The probability that an electron is a distance [math]r[/math] from the center of the hydrogen atom

[math]P(r) = Cr^2 \exp^{-2 \frac{r}{R}}[/math]

Doing the integrals by hand (no tables or software that performs integrals) ,

a.)Find the value of C

b.) Find the mean electron radius and standard deviation for an electron in a hydrogen atom

Histograms by Hand

Given the following test scores from 40 students.

Trial Value Trial Value Trial Value Trial Value
1 49 11 90 21 69 31 74
2 80 12 84 22 69 32 86
3 84 13 59 23 53 33 78
4 73 14 56 24 55 34 55
5 89 15 62 25 77 35 66
6 78 16 53 26 82 36 60
7 78 17 83 27 81 37 68
8 92 18 81 28 76 38 92
9 56 19 65 29 79 39 87
10 85 20 81 30 83 40 86

a.) calculate the mean and standard deviation

b.) construct a histogram by hand which has 10 bins from 0 to 100 and centered on 10,20,...

c.) Use ROOT to construct a histogram. Compare the mean and RMS from ROOT with your result in part (a) above. What is the difference between the RMS report in the ROOT histogram and the standard deviation you calculated in part (a)?

Variance using Probability function

Given that

[math]\sigma^2 = \lim_{N \rightarrow \infty} \frac{1}{N}\sum_{j=1}^n \left [ \left (x_j - \mu \right)^2) \right ][/math]

Justify that

[math]\lim_{N \rightarrow \infty} \frac{1}{N}\sum_{j=1}^n \left [ \left (x_j - \mu \right)^2 \right ] = \lim_{N \rightarrow \infty} \left [ \frac{1}{N}\sum_{j=1}^n x_j^2\right ] - \mu^2[/math]


Note
The standard deviation ([math]\sigma[/math]) is the root mean square (RMS) of the deviations.

RMS = [math]\sqrt{\frac{1}{N}\sum_i^N x_i^2}[/math] so [math]\sigma = \mbox{RMS}(x_i -\mu)[/math]

Binomial Probability Distributions

1.)Evaluate the following (at least one by hand)


a.) [math]{6\choose 3}[/math]

b.) [math]{4\choose 2}[/math]

c.) [math]{10\choose 3}[/math]

d.) [math]{52\choose 4}[/math]


2.) Plot the binomial distribution P(x) for n=6 and p=1/2 from x=0 to 6.

[math]P(x) = {n\choose x}p^{x}q^{n-x} [/math]


3.) Given the probability distribution below for the sum of the point on a pair of dice


[math]P(x) =\left \{ {\frac{x-1}{36} \;\;\;\; 2 \le x \le 7 \atop \frac{13-x}{36} \;\;\; 7 \lt x \le 12} \right .[/math]


a.) find the mean

b.) find the standard deviation [math](\sigma)[/math]


4.) Prove that [math]\sigma^2 = npq[/math] for the Binomial distribution.

Poisson Prob Dist

Variance

Show that [math]\sigma^2 = \mu[/math] for the Poisson Distribution starting with the definition of variance.

Binomial/Poisson Statistic

The probability that a student will fail this course is 7.3%.

a.) Calculate by hand (i.e. without a computer/calculator) the expected number of students that will fail this course if there are 32 enrolled?

b.) Calculate by hand the probability that 5 or more will fail in one semester.

Deadtime

In a counting experiment it is possible for a detector to be "too busy" recording the effects of a detected particle that it is unable to measure another particle traversing the detector during the short time interval. "Dead time" is a measure of the time interval over which your detector is unable to make a measurement because it is currently making a measurement.

Assume that particle hit your detector at a rate of [math]1 \times 10^6[/math] particles/sec and that your detector has a deadtime of 200 ns [math](200 \times 10^{-9} sec)[/math]. The mean number of particles hitting the detector during this deadtime is [math]\mu = 0.2[/math]. The detector efficiency is defined as

[math]\epsilon = \frac{\mbox{average number of particles counted}}{\mbox{number of particles passing through the detector in 200 ns}}[/math]

a.) Find the efficiency of the detector assuming the process follows the Poisson distribution.

b.) Graph the efficiency as a function of the incident particle flux for rates between 0 and [math]10 \times 10^6[/math] particles/sec.

Gaussian Prob Dist

Counting experiment variance

a.)What is the standard deviation for a counting experiment with a mean number of counts [math]\mu[/math] = 100.

b.)What is the standard deviation if you repeat the above counting experiment ten times?

Half Width -vs- variance

Show that the full-width at half maximum [math](\Gamma)[/math] is related to the standard devision by [math]\Gamma = 2.3548 \sigma[/math] for the Gaussian probability distribution. Begin with the definition that

[math]P_G\left (\mu + \frac{\Gamma}{2} \right ) = \frac{P_G(\mu)}{2}[/math]

Gaussian Probability

a.) Determine, by direct integration, the probability of observing a value beyond 1 standard deviation from the mean of a Gaussian distribution? ie: [math]P_G(X \le \mu - \sigma, \mu, \sigma)+ P_G(X \ge \mu + \sigma, \mu, \sigma)[/math] =?

Grad students do parts b & c below:

b.) Find the value of [math]A[/math] such that [math]P_G(\mu + \sigma, \mu, \sigma) = A P_G(\mu,\mu,\sigma)[/math].

c.) repeat parts a.) and b.) above for [math]P_G(\mu + P.E., \mu, \sigma)[/math] and [math]P_G(\mu + \Gamma/2, \mu, \sigma)[/math]


[math]P_G(X =\mu + \sigma, \mu, \sigma)=0.24197 = 0.60653 P_G(X = \mu , \mu, \sigma)[/math]

[math]P_G(X =\mu + PE, \mu, \sigma)=0.3178 = 0.7965 P_G(X = \mu , \mu, \sigma)[/math]

[math]P_G(X =\mu - \Gamma/2, \mu, \sigma)=0.19947 = 0.5 P_G(X = \mu , \mu, \sigma)[/math]

Error Propagation

Lorentzian

a.)What fraction of the area of a Lorentzian curve is enclosed within the interval [math](\mu \pm \frac{3}{2} \Gamma)[/math]?

b.) The probability of observing a value from the Lorentzian distribution that is more than 2 half-widths ([math]\Gamma/2[/math]) from the mean.

Derivatives

Find the uncertainty [math]\sigma_x[/math] in [math]x[/math] as a function of the uncertainties[math] \sigma_u[/math] and [math]\sigma_v[/math] in [math]u[/math] and [math]v[/math] for the following functions:

a.) [math]x = \frac{1}{2(u-v)}[/math]

b.) [math]x= uv^2[/math]

c.) [math]x = u^2 + v^2[/math]

d.) [math]x = \frac{u-v}{u+v}[/math]


Snell's Law

Given Snell's Law

[math]n_1 \sin(\theta_1) = n_2 \sin(\theta_2)[/math]

Assume [math]n_1=1[/math] is known with absolute certainty and find [math]n_2[/math] and it's uncertainty when the following angles are measured

[math]\theta_1 = (22.03 \pm 0.02)^{\circ}[/math]
[math]\theta_2 = (14.45 \pm 0.2)^{\circ}[/math]


Linear Fit

2 Eq. 2 unknowns

Determine [math]x[/math] & [math]y[/math] for the system below using either Kramer's Rule or Matrix inversion

[math]7x + 8y =100[/math]
[math]2x-9y = 10[/math]

3 Eq. 3 unknowns

Given the system of 3 Equations and 3 Unkowns:

[math]a_{11}x + a_{12}y + a_{13}z = A[/math]
[math]a_{21}x + a_{22}y +a_{23}z= B[/math]
[math]a_{31}x + a_{32}y +a_{33}z= C[/math]

or in matrix form

[math]\left( \begin{array}{ccc} a_{11} & a_{12} & a_{13}\\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{array} \right)\left( \begin{array}{c} x \\ y \\z\end{array} \right)= \left( \begin{array}{c} A \\ B \\C \end{array} \right) [/math]


a.)Express a the solution for x,y, and z in matrix form assuming the remaining terms in the above are known ([math]A,B,C[/math] and [math]a_{ij}[/math] are known)


b.) Find expressions for x,y, and z in terms of A,B,C when

[math]x + y -z = A[/math]
[math]z= B[/math]
[math]2x + y +2z= C[/math]

Linear Data Fit

A metal rod is placed with its ends in two different temperature baths. One bath is at zero degree Celsius and the other at 100. The temperature along the rod is measure and given in the table below.

Trial Position (cm) Temperature (Celsius)
1 1.0 15.6
2 2.0 17.5
3 3.0 36.6
4 4.0 43.8
5 5.0 58.2
6 6.0 61.6
7 7.0 64.2
8 8.0 70.4
9 9.0 98.8

a.) Using the program developed in Lab 10, fit the above data assuming a linear function T = A + B X

assuming all of the data has the same uncertainty. Report the value of A & B and the uncertainty in the parameters.

b.) repeat part a.) above except this time assume each data point has an uncertainty given by the Poisson distribution as:

[math]\sigma_i^2 \approx T_i[/math].

Polynomial Least Squares Fit

Matrix Inversion

Use the Gauss-Jordan method to find the inverse matrix [math]\tilde{A}^{-1}[/math] by hand given

[math] \tilde{A} = \begin{bmatrix} 2 & -1 & 0\\ -1 & 2 & -1 \\ 0 & -1 & 2 \end{bmatrix}. [/math]

Poly Fit using ROOT

Hand in your source code and graphs for Lab 13

Polynomial Least Squares Fit

Perform a least squares fit to the data in Lab 14 using the Grid search method from Lab 16.

This will be a way to check your grid search algorithm against a known solution. Use the Temp -vs- Voltage data and the Linear function in Lab 13 above.

Hand in your source code in ROOT and a graph showing the linear fit with the Grid search parameters and the parameters found through Matrix inversion.

[1] Forest_Error_Analysis_for_the_Physical_Sciences