Exercise

Inverse cumulative distribution function

The logistic function (logistic distribution CDF) has another important property: each x input value is transformed to a unique value. That means that the transformation can be reversed. The logit function is the name for the inverse logistic function, which is also the logistic distribution inverse cumulative distribution function. (All three terms mean exactly the same thing.)

The logit function takes values between zero and one, and returns values between minus infinity and infinity.

dplyr and ggplot2 are loaded.

Instructions 1/2

undefined XP
    1
    2

Create a tibble containing three columns.

  • x values as a sequence from minus 0.001 to 0.999 in steps of 0.001.
  • logit_p made from p transformed with the logistic distribution inverse CDF.
  • logit_p_man made from p transformed with the equation \(log(\frac{p}{(1 - p)})\).
  • Check that both logit transformations (logit_p and logit_p_man) have the same values with all.equal().