PSTAT 105: Assignment # 1Due Thursday, October 6, 2022
Please submit your solutions online by the end of the day on Thursday.
1. A gambler wants to test whether the die she has is fair so she rolls it 500 times and records the outcomes
as
Roll
1
2
3
4
5
6
Count
80
57
85
79
99
100
meaning she rolled a 1 on the die 80 times, etc.
(a) Give a 95% confidence interval for the probability of the events:
i. The die rolls a 1.
ii. The die rolls a 2.
iii. The die rolls either a 1 or a 2.
(b) Using a binomial model, calculate the P -value for testing whether rolling a 1, 2, or 3 is significantly
less likely than a 4, 5, or 6. (Using a one-sided alternative.)
(c) Test whether or not 6 is occurring as often we would expect from a fair die. Use a two-sided
hypothesis test and report your conclusion.
2. Data was recorded on 150 workplace accidents. The number of days since the previous accident is
summarized in the following table
Days
Count
0
37
1
35
2
23
3
23
4
8
5
4
6
7
7
4
8
2
9
2
10
0
11
1
12
1
13
1
15
1
20
1
We want to check to see if a geometric model is appropriate for this data. P{X = x} = p(1 − p)x
(a) Show that the MLE for this model is p̂ = 1/(x̄ + 1).
(b) Calculate the MLE for p from the given set of data.
(c) Calculate the probability of the event A = {X > 3} under this geometric model if we use the
MLE p̂ as the value of the parameter.
(d) Use our nonparametric estimation method to estimate θ = P{X > 3}.
(e) Give a 95% confidence interval for θ.
3. We have n independent observations X1 , . . . , Xn from a continuous distribution, and we want to test
the hypothesis that the median of these observations is 100 against the alternative that the median is
greater than 100. Let Y be the number of Xi greater than 100.
(a) What is the distribution of Y under the null hypothesis?
(b) Write explicitly the null and alternative distributions in terms of the parameters in the distribution
of the Y random variable. Be as specific as possible.
(c) If n = 482 and Y = 263, calculate the appropriate P -value for this test.
(d) What assumptions, if any, are necessary for this to be a valid test?
1
4. For this question, please include typed answers to the questions along with your R input
and output. All your graphs and plots should be plotted large enough for us to read and
be fully labeled including informative axis labels.
The file compensation.txt contains data about average compensation in a sample of counties in the
US.
(a) Load the data into R and draw a histogram of the data. (You could use the hist function or
geom_histogram.)
(b) The histogram produced by default settings in R always seems to me to have too few bars. Plot
additional histograms where the number of bars is increased to 35 and 100. Which histogram do
you think does the best job of illustrating the data set and why? (Hint: if you include a color in
the call to hist, it can make it easier to see the bars.)
(c) In order to find a confidence interval for the average over all the counties, I used the following R
functions
> t.stat t.stat$conf.int
[1] 61381.55 65001.70
attr(,”conf.level”)
[1] 0.95
Looking at the histogram, why would we be concerned about the validity of the confidence interval?
Please be as specific as you can.
(d) Run the command mean( compensation
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Achiever Papers is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Dissertation Writing Service Works
First, you will need to complete an order form. It's not difficult but, if anything is unclear, you may always chat with us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order form
Once we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignment
As soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download