Custom Probability Distribution Functions in R
Instruction: Write a function in R that defines a custom probability distribution, including density, distribution, quantile, and random generation functions.
Context: This question tests the candidate's ability to implement custom statistical distributions in R, a skill useful for simulating data and for statistical modeling.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Density Function (dMyDist): The density function will return the probability density of our custom distribution at a given point. For a scaled beta distribution, we can utilize R's built-in dbeta function, scaling it appropriately...