AST443/PHY517 Homework 3

advertisement
AST443/PHY517
Homework 3
1. You observe the following number of counts in a time series:
26 32 28 26 29 24 24 24 27 25 25 30 25 29 31 25 29
A.) What are the mean, mode, and median values?
Mean = 27; mode = 24; median=26
B.) What is the standard deviation
of the mean?
√
2.60 C.) Assume gaussian ( N ) statistics. What are the values of the χ2 and
χ2ν statistics?
χ2 =3.88; χ2ν =0.24 At what level of confidence can you reject the hypothesis that
the data are constant? Given that the reduced χ2 is < 1, this is probably
consistent with a constant. Looking up the α values for χ2ν =0.24 and
ν=17, 1−α < 0.99 (the actual value is about 0.0009). You cannot reject
the null hypothesis at 99% confidence.
2. Write an IDL program that
(a) generates a vector of 1000 points with normally-distributed (i.e.,
rors. (hint: use the randomn function).
√
N ) er-
(b) plots the distribution of residuals from the mean.
(c) fits the distribution with a Gaussian (hint: check the gaussfit procedure).
Verify that the errors are normally distributed.
(d) computes the chi-square of the residuals with respect to the mean.
Show the code, as well as your plots and answers.
;*************************************************************
pro h3_p2,n,np=np
;n is the number
if n_elements(n) eq 0 then n=1000
;default value
if n_elements(np) eq 0 then np=1000
;number of random points to generate
;
r=randomn(seed,np)
;mean=0, variance=1
r=r*sqrt(n)+n
;broadens variance to sqrt(n), and sets mean to N
plot,r,xtitle=’’,ytitle=’’,title=’Randomized data’
; Data should look noisy
;
mn=mean(r)
; mean value, should = n
print,’ Mean= ’,mn,’ Input value = ’,n
residual=r-mn
;
; now, use the histogram function to generate the distribution of residuals
;
r1=min(residual)
;minimum value
hist=histogram(residual,min=r1)
x=r1+findgen(n_elements(hist))
;generate X axis
plot,x,hist,ytitle=’Number of points’,title=’Histogram of residuals’,xtitle=’Res
idual’
;
; now, fit the distribution
;
a=fltarr(3)
a[0]=max(hist)
;guess at peak value
a[1]=0.
;center should be near 0
a[2]=sqrt(n)
;variance should be about sqrt(n)
y=gaussfit(x,hist,a,nterms=3)
oplot,x,y
print,’ Measured variance = ’,a[2],’ sqrt(n) = ’,sqrt(n)
return
end
3. You observe a star on a CCD image. A circular region of 5 pixel radius centered
on the star contains 500 counts. A circular region of 10 pixel radius centered on
the star contains 770 counts. Determine the number of source counts, and the
S/N of the detection.
The outer region includes the inner region, so the 770 counts is comprised of 500 (source + background) + 270 background counts. The
500 (source + background) counts lie in a π52 pixel area; the 270 background counts fall in an annulus of area π(102 − 52 ) pixels. The 75π
pixel background area is 3 times that of the source, and so contains
3 times the background. Therefore, the 500 counts includes 90 background counts. There are 500-90=410
counts.
q√ source
√ 2
√
2
To calculate the S/N: S=410. N=
500 + 90 .]] S/N = 410/ 590 =
16.9
4. You observe a quasar with a count rate of 0.2 counts per second; the background
is 0.1 counts per second.
A.) How long do you need to observe to detect 100 counts from the quasar?
T=100 cts / 0.2 cts/sec = 500 sec
B.) What is the S/N in this time?
There are 500 sec × 0.1 cts/sec = 50 cts. The total number of√setected
counts (source + backgrouns) = 150; the S/N = (150 − 50)/ 150 + 50
= 7.1
C.) How long need
detect the√quasar with S/N=10?
√ you observe√to √
S/N = 0.2 × t/ 0.4 × t = 0.2 t/ 0.4 = 10 t. You will need 1000 seconds.
5. In Ordinary Least Squares OLS(Y|X), y is a function of x and there are no uncertainties associated with x. One fits a model f(x) by maximizing the probability
1 yi −f (xi ) 2
[
]
σi
1.
Pi = σ √
e2
2π
i
.
A.) Show that this is equivalent to minimizing the square of the deviation [ yi −fσi(xi ) ]2 .
Maximizing the probability is equivalent to minimizing the argument
of the exponential in the equation for P. The argument is the deviation. QED.
B.) for a linear model, f=mx+b, minimize the square of the deviations to solve
for m and b. Assume that the uncertainties σi are uniform.
See Wall and Jenkins, section 6.1
C.) (PHY517 only). Redo part B for the case where σi are not uniform.
See Bevington and Robinson, section 6.3
D.) (PHY517 only). Repeat part B, but for a quadratic model. Assume uniform uncertainties.
See Bevington and Robinson, section 7
6. After fading for the first 30 days after it exploded, Nova Del 2013 began brightening in the K band on about day 30. Use the results of problem 5, and the data
in the table below, to determine the rate of change of Nova Del 2013 from days
31 to 44 in the I and K bands.
K brightens by 0.056±0.003 mag/day; I fades by 0.059±0.008 mag/day.
Note that this ignores the uncertainties in the data points. Including
them increases the K band uncertainty to 0.004
(PHY517 only). Is the difference in the two rates
√ significant? Be quantitative.
Yes. The rates differ by (0.056 + 0.059)/ .0043 + .0082 = 12.9σ. Note
that the uncertainties are added in quadrature.
Day
31.34
33.36
35.34
37.33
39.34
41.34
44.34
N Del 2013 Magnitudes
K mag (error)
I mag (error)
4.683 0.003
6.211 0.001
4.624 0.003
6.310 0.001
4.534 0.002
6.337 0.001
4.421 0.003
6.429 0.001
4.308 0.002
6.497 0.001
4.168 0.002
6.753 0.001
3.970 0.002
7.004 0.001
Download