stats_Chapter 6
View on GitHub | Download Local
Extracted Content (for search)
Click to view slide text
Chapter 6 Dr Wayne Stewart
Go through all examples!!
Proof β’ π£ππ β’ π£ππ
π π + ππ ππ π π β ππ ππ
β₯0 β₯0
Example
The true density
w method of sampling
rmyexp=function(n, β¦){ graphics.off() w=runif(n,0,1) y=-2*log(1-w) h=hist(y,plot=FALSE, β¦) coll = rgb(hdensity),.4,.1) windows() hist(y,freq=FALSE,main=βUniform Wβ,col = coll, β¦)# col=rainbow(length(h$mids)),β¦) curve( exp(-x/2)/2,add=TRUE,col=βBlueβ,lwd=2) text(10,.3, paste0(βSimulation using\n w uniform method β, βn=β,n,β\n β, β1/2exp(-x/2)β)) legend(βtoprightβ, legend = c(βSimulationβ, βSimulationβ,βTruthβ), fill=c(coll[1],coll[length(coll)], βBlueβ)) dev.new(noRStudioGD = TRUE) df=data.frame(y) library(ggplot2) g = ggplot(df, aes(x=y)) + geom_histogram(aes(fill=..density..), bins = 50) + geom_density( col = βRedβ) g = g + stat_function(fun = function(x) exp(-x/2)/2) print(g) } rmyexp(100000, nclass = 40)
Order Statistics β’ Sample of size βnβ what is the distribution of: ππππ , ππππ₯ ?
Taken From Larsen and Marx
Make: dpqr functions for order statistics
Suppose that the following is true: πΉπ π€ = 2π€ β π€ 2
ππ π€ = 2 β 2π€ = 2(1 β π€)
Create dpqr functions!
Follow the R code
Go through all examples
Get these examples
In R the standard error is the estimate of the standard deviation of the sampling statistic
Normal approximation to the Binomial
Condition to be satisfied
Continuity correction
This will be difficult to remember β please use first principles to perform continuity corrections
Sampling distributions β related to Normal
Find ππ (π§)
Definition of T random variable
Go through all examples