Description:
The qbern() function appears to return 1 instead of 0 for the input p = 0.1, prob = 0.9, and lower.tail = TRUE. Based on the Bernoulli CDF, the expected result is 0, as P(X <= 0) = 0.1 satisfies the condition F(q) >= p.
Steps to Reproduce:
library(extraDistr)
qbern(p = 0.1, prob = 0.9, lower.tail = TRUE)
# Expected output: 0
# Actual output: 1
#################
R version: 4.1.2
Package version: 1.9.1
Operating system: Windows 10 x64 build 22631
################
Description:
The
qbern()function appears to return1instead of0for the inputp = 0.1,prob = 0.9, andlower.tail = TRUE. Based on the Bernoulli CDF, the expected result is0, asP(X <= 0) = 0.1satisfies the conditionF(q) >= p.Steps to Reproduce: