Question

(1) Using a generator for a binomial distribution, we will test the results of Example 3.8.2. Using software generate 500 random deviates for X from a B(10, 0.3) distribution and 500 random deviates for Y from a B(5, 0.3) distribution. Add corresponding random deviates from each distribution to form an empirical W=X+Y. Then use the theoretical result of Example 3.8.2 and directly generate another 500 random deviates for W from a B(15, 0.3). Order the result of the sum of X+Y and of W. As an empirical test of the equivalence of the distributions create a scatterplot of the random deviates of W on the random deviates of X+Y. (2) Take the same approach for Example 3.8.4, first simulating W=Y/X and then simulating from the distribution representing the theoretical result of the ratio of Y and X. You need a little more guidance here. By Example 3.8.4 any exponential with rate lambda will suffice for Y and X, just use the same lambda, say lambda =1. The ratio will give random values for W. To establish random values of W directly from the density found for Example 3.8.4; that is, 1/(1+w)^2, you need a little help. And here it is. A random deviate for w can be delivered by {1/(1-r)}-1. I would generate a couple thousand random deviates for W=Y/X and for Wdev={1/(1-r)}-1. Next sort both random number sets from smallest to largest. Next, trim maybe the top 5%. That is, eliminate them. The reason is that if you don’t, the Y/X is going to occasionally give you some huge values, which when plotted the way I am recommending will change the scale substantially. So just be satisfied with the lower 95%. Last plot the lower 95% ordered Y/X with the lower 95% Wdev to assess agreement. You should see values on a line with slope 1. Where did {1/(1-r)}-1 come from? For continuous distributions, the distribution function F(w) is distributed as a U(0,1) random variable. We use this fact to establish random deviates. So we equate a uniform random number r with the distribution function F(w). You can verify this, by getting F(w) for yourself, but it works out to be r=1-1/(1+w). Solving for w gives the relationship above. That is how most random number generators are established for specific distributions! (3) Simulate the probability result that is the solution to Problem 3.10.7

The textbook is Introduction to Mathematical Statistics and Its Applications 5th edition by Larsen, Richard J, marx, Morris L

Chegg has the textbook solutions

Answer #1

1) We know that if then . The R code for generating 500 random variates from the 3 distributions and plotting the the sum against is given below.

*m <- 500
n1 <- 10
n2 <- 5
p <- 0.3*

*X <- rbinom(m,n1,p)
Y <- rbinom(m,n2,p)
W <- rbinom(m,n1+n2,p)
sumXY <- array(dim = m)
for ( i in 1:m)
{
sumXY[i] <- X[i]+Y[i]
}
oW <- sort(W)
osumXY <- sort(sumXY)
plot(osumXY,oW,xlab = "X+Y",ylab = "W", col="blue")*

The scatterplot is given below.

The variates lie on a straight line.

2) For this question the distributions are not specified.

x
0
0.05714
1
0.17142
2
0.2
3
0.25714
4
0.11428
5
0.057142
6
0.114285
7
0.02857
8
0
9
0
10
0
Using the Data
NOTE: RF = relative frequency
(6 points) Use the table from the Theoretical Distribution
section to calculate the following answers. Round your answers to
four decimal places.
P(x = 3) = _______________________
P(1 < x < 4) =
_______________________
P(x ≥ 8) = _______________________
(6 points) Use the data from the Organize the Data...

The probability of a man hitting the target at a shooting range
is 1/4. If he shoots 30 times, what is the probability that he hits
the target at least 10 times? (Copy your R code and the
result).
Suppose X follows a Chi-square distribution with
degree of freedom 12. Find the cutoff point a, such that, P(X<a)
= 0.85.
Entry to a certain University is determined by a national test.
The scores on this test are normally distributed with a mean...

Question about using the convolution of distribution:
1. we have the formula: integral fx(x)fy(z-x)dx=integral
fx(z-x)fy(x)dx
I know this are equivalent. However, how do I decide which side
I should use ?
For example,X~Exp(1) and Y~Unif [0,1] X and Y independnt and the
textbook use fx(z-x)fy(x)dx.
However, can I use the left hand side fx(x)fy(z-x)dx???is there
any constraint for using left or right or actually both can lead me
to the right answer???
2. For X and Y are independent and...

CRYPTOGRAPHY PROBABILITY DISTRIBUTION
Bad Shuffles
Consider the following card shuffling algorithm. There
are three cards in the deck and they are
each represented by an element in {X, Y, Z}. [Bonus marks if you
use the deck {W, X, Y, Z}]
Algorithm Shuffle
---------------------------------------------------
deck := [X,Y,Z]
for i from 0 to 2 do
j := RANDOM(i)
swap values of deck[i] and deck[j]
end for
return deck
---------------------------------------------------
For each of the following definitions of RANDOM(i), compute the
probability distribution...

Using R programming language, complete the following.
1. Generate the bivariate normal sample of size 100 with
parameters
a. marginal mean of X equal to 1,
b. marginal mean of Y equal to 2,
c. marginal variance of X equal to 3,
d. marginal variance of Y equal to 4,
e. correlation between X and Y equal to -1/2.
You can use the function mvrnorm(), first installing its package by
the code
if (! require ("MASS")) install.packages("MASS"); library
("MASS")
2....

Question 1
A binomial
distribution reflects two possible outcomes, which can be denoted
as "success and failure"
True
False
1 points
Question 2
As a binomial
distribution is discrete, we can not ever use the normal
distribution?
True
False
1 points
Question 3
The text mentions that
in order to use the normal distribution for binomial distributions
that EITHER n(p) OR n(q) must be > 5.
True
False
1 points
Question 4
The reason that both
n(p) and n(q) are...

Conducting a Simulation
For example, say we want to simulate the probability of getting
“heads” exactly 4 times in 10 flips of a fair coin.
One way to generate a flip of the coin is to create a vector in
R with all of the possible outcomes and then randomly select one of
those outcomes. The sample function takes a vector of elements (in
this case heads or tails) and chooses a random sample of size
elements.
coin <- c("heads","tails")...

1. Decide (write yes or no) whether the experiments are binomial
experiments or not. Explain why or why not using a complete
sentence:
a) You spin a number wheel that has 20 numbers 500 times. The
random variable represents the number that is spun.
b) Surveying 300 prisoners to see whether or not they are
serving time for their first offense. The random variable
represents the number of prisoners serving time for their first
offense. Assume each prisoners response is
independent....

Q: A 95% confidence interval for the mean is (102, 106). If we
test Ho: ? = 100 vs. H1: ? ?
100, the p-value will be:
(A) larger than 0.05
(B) smaller than 0.05
(C) larger than 0.01
(D) smaller than 0.01
Q: Suppose you want to conduct a t-test using ? = 0.05. You take
a random sample of size 30
and obtain the sample mean and sample standard deviation. As a
result, you fail to reject the...

Problem 1.
Rules for a Discrete Probability Distribution are given in 6.1,
page 317 and Examples 3,4 on pages 317,318.
Remember, there are two conditions to
check - the total sum and the range of P(x).
Based on the above criteria decide whether a), b), c)
below are valid probability distributions (3 separate
questions).
Just do the required checks. On one hand, be
specific and concise, give all necessary details.
On the other hand, please, do not copy general paragraphs from...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 20 minutes ago

asked 22 minutes ago

asked 32 minutes ago

asked 36 minutes ago

asked 38 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago