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

Tutorial 1

The document contains a tutorial for STA3030F with various statistical problems involving bootstrap sampling, hypothesis testing, and confidence intervals. It includes specific tasks such as calculating sample means and standard deviations, generating bootstrap samples in R, and testing hypotheses about population parameters. Additionally, it discusses the nature of bootstrap samples and the assumptions necessary for their use in statistical inference.

Uploaded by

makhethampho51
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)
3 views2 pages

Tutorial 1

The document contains a tutorial for STA3030F with various statistical problems involving bootstrap sampling, hypothesis testing, and confidence intervals. It includes specific tasks such as calculating sample means and standard deviations, generating bootstrap samples in R, and testing hypotheses about population parameters. Additionally, it discusses the nature of bootstrap samples and the assumptions necessary for their use in statistical inference.

Uploaded by

makhethampho51
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

STA3030F Tutorial 1

Question 1

A random sample of size 8 from an unknown distribution with a population mean µ has yielded
the following observations:

0.35 1.15 0.40 0.08


0.03 0.20 0.10 0.15

The sample mean and standard deviation were calculated as 0.3075 and 0.3642 respectively. The
sample averages for each of 1000 bootstrap samples were calculated, and then ordered from smallest
to largest. The following are some of the ordered results obtained:

Sample No. 1 10 25 50 100


Sample Ave. 0.066 0.096 0.122 0.136 0.164
Sample No. 900 950 975 990 1000
Sample Ave. 0.462 0.539 0.579 0.664 0.812

(a) Use R to do the following


(i) Read the above original sample into R.
(ii) Display the above original sample mean and standard deviation.
(iii) Generate 1000 bootstrap samples and display the bootstrap sample averages that ap-
pear in the above table (i.e. the first, the tenth, the twenty-fifth, the fiftieth, the one
hundredth, ..., the one thousandth bootstrap sample mean). To obtain exactly the same
sample averages, set a seed of 2025 before generating the bootstrap samples i.e., outside
the for loop.

(b) Use the bootstrap results to find an exact p-value for a test of the null hypothesis H0 : µ = 0.50
against H1 : µ ̸= 0.50. What would you conclude?

(c) Construct a 95% confidence interval for the population mean based on the bootstrap data
provided.

Question 2

A random sample of size 10 was generated from an unknown distribution with population mean
37 and variance σ 2 :

30 37 43 42 43 45 36 33 41 38

Find the sample mean and write a R function to generate 5000 bootstrap samples, seeded 1 to
5000, i.e. 1, 2, 3, . . . , 5000. In R, store the T statistic of each sample. What is the average value of
the T statistics?
Question 3

A random sample of size 10 from an unknown distribution with median m has yielded the following
observations:

0.05 2.11 2.08 5.40 5.52


6.78 8.06 8.54 9.57 21.89

Year: 2025 1
STA3030F Tutorial 1

The sample medians for each of 1000 bootstrap samples were calculated, and then ordered from
smallest to largest. The following are some of the ordered results obtained:

Sample No. 1 10 25 50 100 250 500


Sample Med. 1.08 2.09 2.11 3.74 3.75 5.46 6.15
Sample No. 750 900 950 975 990 1000
Sample Med. 7.42 8.06 8.54 8.81 9.05 15.73

(a) Use the bootstrap results to find an exact p-value for a test of the null hypothesis H0 : m ≤ 4.5
against H1 : m > 4.5. What would you conclude?

(b) Construct a 90% confidence interval for the median based on the bootstrap data.

Question 4

(a) What is a bootstrap sample?

(b) What assumptions do we make about bootstrap samples that allow us to use them for making
inference?

(c) “If a 95% confidence interval for a population mean µ is computed as [10; 15], this means
that there is a 95% probability that µ lies between 10 and 15”. Is this statement true or
false? Explain your answer.

Year: 2025 2

You might also like