# All functions in this script are Core R (no package needed). # Example - Uniform Distribution on [0,6] ######################################################################################## # P(X≤2) punif(2, min=0, max=6) # P(X≤2 or X≥4) (three different calculations) punif(2, min=0, max=6) + punif(4, min=0, max=6, lower.tail=FALSE) 2 * punif(2, min=0, max=6) # Requires symmetry punif(2, min=0, max=6) + (1 - punif(4, min=0, max=6))