5
THE Abdus Salam I NTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED S TUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible solution Course: 2020 M.M.P. Statistics for Medicine (P5.2) – Professor: Massimo Borelli Due date: Sunday 9th, 2020 Question 1. Refer to the above graph as proposed by Bernard Rosner, concerning the normally distributed diastolic blood pressure. 2. (Integration) Evaluate by means of R, or R Commander, the probabilities of region A, B and C by means of pnorm function. 3. (Monte Carlo) Simulate 100000 normally distributed random point to replicate the above graph, and estimate A, B and C. Verify the equivalence of findings. 4. Report the 2. and 3. outputs, eventually arranged in a more readable form, into the Answer section of the present Homework # 2. 9. Go to https://ictpmmp.weebly.com/assignements.html in order to upload your final .pdf document. Answer. 1. Referring to the above graph, we can guess - at a glance - that the gaussian distribution has μ = 80. One inflection point is - at a glance - approximately at 92, so one possible rough estimate of the standard error may be σ = 12. Several colleagues prefer a lower estimate, σ = 10. Here the nice plot of colleague Tiigi Kätlin: 1

THE Abdus Salam INTERNATIONAL DVANCED …...THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible

  • Upload
    others

  • View
    26

  • Download
    0

Embed Size (px)

Citation preview

Page 1: THE Abdus Salam INTERNATIONAL DVANCED …...THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible

THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICSMASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS

Homework #2Student name: possible solution

Course: 2020 M.M.P. Statistics for Medicine (P5.2) – Professor: Massimo BorelliDue date: Sunday 9th, 2020

Question

1. Refer to the above graph as proposed by Bernard Rosner, concerning the normallydistributed diastolic blood pressure.

2. (Integration) Evaluate by means of R, or R Commander, the probabilities of regionA, B and C by means of pnorm function.

3. (Monte Carlo) Simulate 100000 normally distributed random point to replicate theabove graph, and estimate A, B and C. Verify the equivalence of findings.

4. Report the 2. and 3. outputs, eventually arranged in a more readable form, intothe Answer section of the present Homework # 2.

9. Go to https://ictpmmp.weebly.com/assignements.html in order to upload yourfinal .pdf document.

Answer. 1. Referring to the above graph, we can guess - at a glance - that the gaussiandistribution has µ = 80. One inflection point is - at a glance - approximately at 92, soone possible rough estimate of the standard error may be σ = 12. Several colleaguesprefer a lower estimate, σ = 10. Here the nice plot of colleague Tiigi Kätlin:

1

Page 2: THE Abdus Salam INTERNATIONAL DVANCED …...THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible

2020 M.M.P. Statistics for Medicine (P5.2) – Homework #2 2

Recall that in the normal distribution the standard deviation has to be related to theinflection points of the curve, i.e. to one of the two violet F points in the figure above.

Some other colleagues have proposed the following (wrong) approach, to guess themean and the standard deviation of the gaussian:

We recall the section 3.2.5 (The Uniform Distribution) of our Lecture notes: thesequence seq(40, 120, 10) is nothing else then eleven numerated balls:

When putting them in a box, and picking them randomly many many times, themean value of the sequence obtained will approach 80, and the standard deviation ofthe sequence will be approximately 27:

Observe that the (uniform) distribution is very different:

possible solution

Page 3: THE Abdus Salam INTERNATIONAL DVANCED …...THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible

2020 M.M.P. Statistics for Medicine (P5.2) – Homework #2 3

2. Now we can exploit pnorm function in two possible ways:2a (’modern way’). Specifies the quantiles, which respectively are 90, 100, 110 and

120 for the regions A, B and C, and use pnorm in the usual way with R:

or R Commander:

2b (’old-fashioned way’). Exploit the standardization formula (R. Mould ch. 3.3Mathematical Tables, he calls it unit normal deviate), also known as z-score:

X − MS

possible solution

Page 4: THE Abdus Salam INTERNATIONAL DVANCED …...THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible

2020 M.M.P. Statistics for Medicine (P5.2) – Homework #2 4

3. Let us start in a ’small sample size’ way.

We simulate 10 normally distributed random point, and call them montecarlo. Wecreate the regionA intersecting (see the ampersand operator, logical ’AND’) the twological conditions. RegionA now is a sequence of TRUE and FALSE. We count thetrue’s absolute frequencies, by means of a table or by means of the sum function whichcoerces the boolean values into numerical ones (i.e. 1 and 0). The relative frequency isan estimate of the region A. Now, we move from 10 to 100000 to obtain better estimates:

Another not elegant, but quick and effective, possibility to compute A, ’by hand’:

possible solution

Page 5: THE Abdus Salam INTERNATIONAL DVANCED …...THE Abdus Salam INTERNATIONAL CENTRE FOR THEORETICAL PHYSICS MASTER OF ADVANCED STUDIES IN MEDICAL PHYSICS Homework #2 Student name: possible

2020 M.M.P. Statistics for Medicine (P5.2) – Homework #2 5

possible solution