Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

19/10/23, 9:01 tarea1

tarea1
Gustavo Quizhpe
2023-10-19

#clases 19/10/2023
#uso de pnors
pn<-pnorm(0.5)
pn

## [1] 0.6914625

e2<-pnorm(4.5)-pnorm(3.5)
e2

## [1] 0.0002292314

e3<-pnorm(4.5)
e3

## [1] 0.9999966

e4<-pnorm(3.5)
e4

## [1] 0.9997674

#qnorms
qn1<-qnorm(0.5)
qn1

## [1] 0

#rnorm
rno<-rnorm(20,mean = 20,sd=3)
rno

## [1] 21.68210 23.54420 19.79744 19.27673 19.00155 26.71176 16.08945 24.44987


## [9] 22.60744 10.46176 17.68525 24.81463 22.78447 25.88186 22.55640 22.24651
## [17] 21.00316 20.92008 14.08827 14.38221

#dnorm
dn1<-dnorm(12)
dn1

file:///C:/Users/HP/Documents/tarea-en-clases.html 1/4
19/10/23, 9:01 tarea1

## [1] 2.146384e-32

#grafica curva normal


par(mfrow = c(2,1))
de<-c(2,1)
de

## [1] 2 1

plot(function(x) dnorm(x, log = TRUE), -60, 50, moin = "log{ Normal density}")

## Warning in plot.window(...): "moin" is not a graphical parameter

## Warning in plot.xy(xy, type, ...): "moin" is not a graphical parameter

## Warning in axis(side = side, at = at, labels = labels, ...): "moin" is not a


## graphical parameter

## Warning in axis(side = side, at = at, labels = labels, ...): "moin" is not a


## graphical parameter

## Warning in box(...): "moin" is not a graphical parameter

## Warning in title(...): "moin" is not a graphical parameter

#grafica curva normal


pn1<-pnorm(4.5)
pn1

## [1] 0.9999966

pn2<-pnorm(3.5)
pnT<-(pn1-pn2)
pnT

## [1] 0.0002292314

plot(function(x) dnorm(x, log = TRUE), -30, 70,


main = "log { Normal density }")
curve(log(dnorm(x)), add = TRUE, col = "red", lwd = 2)
mtext("dnorm(x, log=TRUE)", adj = 0)
mtext("log(dnorm(x))", col = "red", adj = 1)

file:///C:/Users/HP/Documents/tarea-en-clases.html 2/4
19/10/23, 9:01 tarea1

curve (dnorm(x,mean=0,sd=1), from =-10, to=6,lwd=6,col="yellow")


mtext("Tarea1",xlab="1",ylab="f(x)")

file:///C:/Users/HP/Documents/tarea-en-clases.html 3/4
19/10/23, 9:01 tarea1

R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS
Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com
(http://rmarkdown.rstudio.com).

When you click the Knit button a document will be generated that includes both content as well as the output of
any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)

## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00

Including Plots
You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that
generated the plot.

file:///C:/Users/HP/Documents/tarea-en-clases.html 4/4

You might also like