0% found this document useful (0 votes)
6 views2 pages

Ejercicios 1

Ejercicios Inferencia Estadística

Uploaded by

ppwcgzwng4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Ejercicios 1

Ejercicios Inferencia Estadística

Uploaded by

ppwcgzwng4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

University of Zurich STA402

Department of Mathematics Reinhard Furrer

Worksheet 1 Marc Lischka

If you upload the R solutions of this worksheet as R Markdown (.Rmd) file, please also upload a knitted PDF.
The mathematical solutions are preferably included in the .Rmd or uploaded as a scan.

Problem 1
Consider two normal distributions with means µA = 2 and µB = 4, and standard deviations σA = 1 and
σB = 1.5.

Using R, plot the probability density functions (PDFs) of both distributions on the same graph.

Problem 2
The Weibull distribution has the following density:
κ  x κ−1   x κ 
f (x; κ, σ) = exp − , x ≥ 0,
σ σ σ
which depends on the two parameters σ, κ > 0.

(a) Using R, plot the density of the Weibull distribution for shape values κ ∈ {0.5, 1.0, 1.5, 5.0} and scale
values σ ∈ {1, 1.5, 2}.

(b) The shape of the density of a Weibull random variable depends greatly on the value of κ. More
specifically, there are three cases of interest: 0 < κ < 1, κ = 1 and κ > 1. Let σ = 1: by using relevant
plots in R, give a qualitative description of the obtained pattern for each of the aforementioned cases.

Problem 3
Consider the hospital dataset http://user.math.uzh.ch/furrer/download/sta402/hospital.csv, which con-
tains data related to a number of patients at a certain hospital. The length of the hospitalization period is
given in the column stay, while age corresponds to a certain age group, hmo and died are binary variables,
representing insured and deceased patients, respectively.

(a) In R plot a histogram of the stay data. At a first glance, do you think a Poisson random variable could
fit well the given counts? Explain why.

(b) The name “geometric distribution” usually refers to one of two similar discrete probability distributions:

• The probability distribution of the number X ∼ Geom(p) of Bernoulli trials needed to get one
success, with probability mass function (1 − p)x−1 p for x = 1, 2, 3, . . .
• The probability distribution of the number Y ∼ Geom0 (p) of Bernoulli trial failures before the
first success, with PMF (1 − p)x p for x = 0, 1, 2, . . .

Using (for example) the R command any in a proper way, realize that all the provided counts are strictly
positive. Which geometric distribution should we choose to model our data?

(c) Let X ∼ Geom0 (p) for 0 < p ≤ 1. The related zero-truncated distribution is given by X | X > 0; find
explicitly its probability mass function. What do you notice?

1
Problem 4
iid
Let X1 , . . . , Xn ∼ Gamma(α, β), where α, β are shape and rate parameter, respectively.

(a) What are the method of moment estimates of α and β?

(b) Consider the dataset exercise2 (available at http://user.math.uzh.ch/furrer/download/sta402/


exercise2.RData). Find the method of moment estimates of α and β using R.

(c) Verify the quality of your estimates visually using R.

Problem 5 *
Consider the following distributions and answer the questions below:

(y − µ)2
 
1
(a) Normal distribution: f (y; θ) = √ exp − , µ known.
2πθ 2θ
 
n y
(b) Binomial distribution: f (y; π) = π (1 − π)n−y , n known.
y
β α α−1 −yβ
(c) Gamma distribution: f (y; α) = y e , rate parameter β > 0 known.
Γ(α)
(d) Exponential distribution: f (y; θ) = θe−θy .

(e) Uniform distribution f (y; θ) = 1/θ, 0 < y < θ.

1. Which distributions belong to the exponential family? Identify their components.


Hint: The exponential family has the form f (y; θ) = h(y) exp(η(θ) · T (y) − A(η(θ))).

2. For those distributions that belong to the exponential family, which are in canonical form? i.e., η(θ) =
c1 · θ + c2 where c1 , c2 ∈ R a constant.

http://www.math.uzh.ch/[sta402].1 | 01worksheet Due Date: 2023-09-25, 13:00

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy