Question

The normal distribution has parameters μ and σ. The possible values for μ are all numbers...

The normal distribution has parameters μ and σ. The possible values for μ are all numbers on the real line, while σ must be positive. Write an R function that takes in a vector with two elements theta(whose values are unrestricted) and returns a list with two elements. The first element is to represents μ,mu=theta[1], and the second element is to represent σ,sigma=exp(theta[2]). Write a function that takes in a named list for mu and sigma and returns theta.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

## "Unrestricted_Theta()" is the R function that takes in a vector with two elements theta
## (whose values are unrestricted)

Unrestricted_Theta <- function(theta){
   mu <- theta[1];
   sigma <- exp(theta[2]);
   theta <- list();           ### Defining a list named as theta
   theta[[1]] <- mu;           ### Assigning mu to list theta as the first element
   theta[[2]] <- sigma;       ### Assigning sigma to list theta as the second element
   return(theta);
}

Add a comment
Know the answer?
Add Answer to:
The normal distribution has parameters μ and σ. The possible values for μ are all numbers...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Define a class named COMPLEX for complex numbers, which has two private data members of type...

    Define a class named COMPLEX for complex numbers, which has two private data members of type double (named real and imaginary) and the following public methods: 1- A default constructor which initializes the data members real and imaginary to zeros. 2- A constructor which takes two parameters of type double for initializing the data members real and imaginary. 3- A function "set" which takes two parameters of type double for changing the values of the data members real and imaginary....

  • help ASAP 3. Write a string C++ function named UnsignedPartialSum() that takes two string parameters and...

    help ASAP 3. Write a string C++ function named UnsignedPartialSum() that takes two string parameters and an int parameter. If both string parameters represent binary numbers and the int parameter is equal to a positive number less than or equal to the length of the longest string parameter, the function should return a binary string whose length is equal to two times the length of the maximum length of the two string parameters whose value is equal to the sum...

  • A population of values has a normal distribution with μ=90.9 μ=90.9 and σ=46.3 σ=46.3 . You...

    A population of values has a normal distribution with μ=90.9 μ=90.9 and σ=46.3 σ=46.3 . You intend to draw a random sample of size n=69 n=69 . Find the probability that a single randomly selected value is between 78.6 and 89.8. P(78.6 < X < 89.8) = Find the probability that a sample of size n=69 n=69 is randomly selected with a mean between 78.6 and 89.8. P(78.6 < M < 89.8) = Enter your answers as numbers accurate to...

  • A population of values has a normal distribution with μ = 118.5 and σ = 4.7...

    A population of values has a normal distribution with μ = 118.5 and σ = 4.7 . You intend to draw a random sample of size n = 120 . Enter your answers as numbers accurate to 4 decimal places. Find the probability that a single randomly selected value is greater than 119.4. Find the probability that a sample of size n = 120 is randomly selected with a mean greater than 119.4.

  • A population of values has a normal distribution with μ = 101.4 and σ = 82.4...

    A population of values has a normal distribution with μ = 101.4 and σ = 82.4 . You intend to draw a random sample of size n = 129 . Find the probability that a single randomly selected value is greater than 96.3. P(X > 96.3) = Find the probability that a sample of size n = 129 is randomly selected with a mean greater than 96.3. P( ¯ x > 96.3)= Enter your answers as numbers accurate to 4...

  • A population of values has a normal distribution with μ = 173 and σ = 36.1...

    A population of values has a normal distribution with μ = 173 and σ = 36.1 Find the probability that a single randomly selected value is between 167.4 and 176.9.

  • A population of values has a normal distribution with μ=39.5 and σ=37.4. You intend to draw...

    A population of values has a normal distribution with μ=39.5 and σ=37.4. You intend to draw a random sample of size n=146. What is the mean of the distribution of sample means? μ¯x= What is the standard deviation of the distribution of sample means? (Report answer accurate to 2 decimal places.) σ¯x=

  • A population of values has a normal distribution with μ = 221.5 and σ = 27.5...

    A population of values has a normal distribution with μ = 221.5 and σ = 27.5 . You intend to draw a random sample of size n = 160 . Find the probability that a single randomly selected value is less than 223?   P(X < 223) = Find the probability that a sample of size n=160n=160 is randomly selected with a mean less than 223. P(M < 223 Enter your answers as numbers accurate to 4 decimal places. Answers obtained...

  • If X has a normal distribution with mean μ and standard deviation σ, and Z is...

    If X has a normal distribution with mean μ and standard deviation σ, and Z is the standard normal random variable whose cumulative distribution function is P(Z s Z)-0(Z), then which of the following statements is NOT correct? O E. All of the given statements are not correct

  • 1. Write a function named findTarget that takes three parameters: numbers, an array of integers -...

    1. Write a function named findTarget that takes three parameters: numbers, an array of integers - size, an integer representing the size of array target, a number The function returns true if the target is inside array and false otherwise 2. Write a function minValue that takes two parameters: myArray, an array of doubles size, an integer representing the size of array The function returns the smallest value in the array 3. Write a function fillAndFind that takes two parameters:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT