cont.trans: Transformed PDF of a Continuous Random Variable

View source: R/ch4-fn.R

cont.transR Documentation

Transformed PDF of a Continuous Random Variable

Description

Transformed PDF of a Continuous Random Variable

Usage

cont.trans(fx, TF, FTF, a, b, lo = 0, up = 1, plot = FALSE, ...)

Arguments

fx

PDF of the original random variable

TF

List of transform functions (1~8)

FTF

List of transformed PDF (1~8)

a

Lower limit of the original random variable for calculating P(a<X<b)

b

Upper limit of the original random variable for calculating P(a<X<b)

lo

Lower limit of the original random variable, Default: 0

up

Upper limit of the original random variable, Default: 1

plot

Plot the PDF? Default: FALSE

...

Graphic parameters

Value

None.

Examples

fx = function(x) 2*x*(x>=0 & x<=1)
ty = function(x) 10*x - 4
tw = function(x) -10*x + 4
fy = function(y) fx((y+4)/10)/10
fw = function(w) fx((-w+4)/10)/10
cont.trans(fx, list(y=ty, w=tw), list(fy, fw), 0.3, 0.7, plot=TRUE, cex=1.3)

adoocavo/Rstat_M1 documentation built on March 19, 2022, 3:34 a.m.