Displaying 20 results from an estimated 9000 matches similar to: "Using R to illustrate the Central Limit Theorem"
2008 Oct 15
5
plot - central limit theorem
Hi,
Is there a way to simulate a population with R and pull out m samples,
each with n values
for calculating m means?
I need that kind of data to plot a graphic, demonstrating the central
limit theorem
and I don't know how to begin.
So, perhaps someone can give me some tips and hints how to start and
which functions to use.
thanks for any help,
joerg
2009 Mar 23
3
How to set up a function for "Central Limit Theorem"
Hello guys, I am stuck here:
How do I make 1000 samples of n = 10 observations from an Exponential
distribution and then compute the mean for all those 1000 samples?
Basically I need to prove the Central Limit theorem, which states:
http://www.nabble.com/file/p22664113/d175f06cbf200bd52a2c27a2e56dc594.png
Where the Sn is sum of random variables, n we have from the question, mu is
mean and
2011 Jan 05
3
Assumptions for ANOVA: the right way to check the normality
Dear all,
I would like to know which is the right way to check the normality assumption
for performing ANOVA. How do you check normality for the following example?
I did an experiment where people had to evaluate on a 7 point scale, the degree
of realism of some stimuli presented in 2 conditions.
The problem is that if I check normality with the Shapiro test I get that the
data are not
2003 Jul 22
4
greek in main title
Hello,
I have written a function that demonstrates the CLT by
generating samples following the exponential distribution,
calculating the means, plotting the histogram, and drawing
the limiting normal curve as an overlay. I have the title
of each histogram state the sample size and rate (1/theta)
for the exponential (the output is actually 4 histograms),
but I can't get the greek letter theta
2003 Sep 04
3
Overlaying graphs
----- Original Message -----
From: "Richard A. O'Keefe" <ok at cs.otago.ac.nz>
To: <paul at datavore.com>
Sent: Thursday, September 04, 2003 2:56 AM
Subject: Re: [R] Overlaying graphs
> I do not know how to overlay the curve graphic on top of hist graphic.
>
> Do you know about the "add=TRUE" option for plot()?
>
> I am hoping to show visually
2011 Aug 14
2
Central limit theorem
my data looks like this:
PM10 Ref UZ JZ WT RH FT WR
1 10.973195 4.338874 nein Winter Dienstag ja nein West
2 6.381684 2.250446 nein Sommer Sonntag nein ja Süd
3 62.586512 66.304869 ja Sommer Sonntag nein nein Ost
4 5.590101 8.526152 ja Sommer Donnerstag nein nein Nord
5 30.925054 16.073091 nein Winter Sonntag nein nein Ost
6
2005 Jan 20
1
Cauchy's theorem
In complex analysis, Cauchy's integral theorem states (loosely
speaking) that the path integral
of any entire differentiable function, around any closed curve, is zero.
I would like to see this numerically, using R (and indeed I would like
to use the
residue theorem as well).
Has anyone coded up path integration?
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
2009 Nov 18
1
Cochran's Theorem
I want to understand ANOVA better. But a few textbook that I have do
not describe Cochran's Theorem in details. Could somebody recommend a
book for me?
2010 Dec 18
3
use of 'apply' for 'hist'
Hi all,
##########################################
dof=c(1,2,4,8,16,32)
Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof))
par(mfrow=c(2,6))
apply(Q5,2,hist)
myf=function(x){ qqnorm(x);qqline(x) }
apply(Q5,2,myf)
##########################################
These looks ok.
However, I would like to achieve more.
Apart from using a loop,
is there are fast way to 'add' the titles to be
2010 May 16
2
Box-Cox Transformation: Drastic differences when varying added constants
Dear experts,
I tried to learn about Box-Cox-transformation but found the following thing:
When I had to add a constant to make all values of the original variable
positive, I found that
the lambda estimates (box.cox.powers-function) differed dramatically
depending on the specific constant chosen.
In addition, the correlation between the transformed variable and the
original were not 1 (as I
2004 Dec 02
1
Re: A somewhat off the line question to a log normal distribution
Dear Siegfried,
I believe your boss is wrong saying that:
>He also tried to explain me that the monthly means
>(based on the daily measurements) must follow a
>log-normal distribution too then over the course of a
year.
every statistician know that increasing the sample
size the sample distribution of the mean is proxy to a
gaussian distribution (Central Limit Theorem)
independently
2005 Apr 28
3
have to point it out again: a distribution question
Stock returns and other financial data have often found to be heavy-tailed.
Even Cauchy distributions (without even a first absolute moment) have been
entertained as models.
Your qq function subtracts numbers on the scale of a normal (0,1)
distribution from the input data. When the input data are scaled so that
they are insignificant compared to 1, say, then you get essentially the
2013 May 27
1
Plot histograms in a loop
Hi,
Try either:
set.seed(28)
stats1<- as.data.frame(matrix(rnorm(5*10000),ncol=5))
pdf(paste("test",1,".pdf",sep=""))
par(mfrow=c(2,1))
lst1<- lapply(names(stats1),function(i) {hist(stats1[,i],100,col="lightblue",main=paste0("Histogram of ",i),xlab=i );qqnorm(stats1[,i])})
dev.off()
#or
2004 Sep 20
3
montecarlo simulation
Hy!
I would like to know how run a montecarlo simulation with R.
Thank you!!!!
Francesca Matalucci
__________________________________________________________________
Accesso Internet Gratis per utenti Excite! Attivalo subito!
http://www.excite.it/hitech/accesso
Il Mio Excite. Personalizza la tua Home page Excite come vuoi tu!
http://www.excite.it
AAA/Relazioni. Sfoglia gli annunci e trova la
2005 Apr 22
1
an interesting qqnorm question
Hi, r-gurus:
I happened to have a question in my work:
I have a dataset, which has only one dimention, like
0.99037297527605
0.991179836732708
0.995635340631367
0.997186769599305
0.991632565640424
0.984047197106486
0.99225943762649
1.00555642128421
0.993725402926564
....
the data is saved in a file called f392.txt.
I used the following codes to play around :)
2008 Jul 06
1
Backgrounds in Multiple Plots made with "fig"
The following code was adapted from an example Vincent Zoonekynd gave on his
web site http://zoonek2.free.fr/UNIX/48_R/03.html:
n <- 1000
x <- rnorm(n)
qqnorm(x)
qqline(x, col="red")
op <- par(fig=c(.02,.5,.5,.98), new=TRUE)
hist(x, probability=T,
col="light blue", xlab="", ylab="", main="", axes=F)
lines(density(x),
2004 Sep 22
5
t test problem?
Hello,
I got two sets of data
x=(124738, 128233, 85901, 33806, ...)
y=(25292, 21877, 45498, 63973, ....)
When I did a t test, I got two tail p-value = 0.117, which is not significantly different.
If I changed x, y to log scale, and re-do the t test, I got two tail p-value = 0.042, which is significantly different.
Now I got confused which one is correct. Any help would be very appreciated.
2012 Sep 14
1
Printing localized pdf file from Sweave snippets
Hello!
I am struggling for quite some time with proper printing of local
characters in pdf plot, via Sweave snippets in Rnw file.
When I am working directly within R, all is fine and I can get local
character properly, like:
pdf('figs/fig-relativeEntropy0.pdf', h=6, w=6, encoding='CP1250')
matplot(par[, c(3)], type='b', ylim=c(0,0.5), xaxt='n', pch=c(21),
2014 Jul 11
2
outliers (Marta valdes lopez)
Tu fichero tiene los decimales como puntos y no como comas como tu le
indicas. Te dejo un ejemplo
#---------------------------------------------------------------------------------------------------------------------
setwd(dir="c:/Users/usuario/Desktop/")
library(outliers)
filename<-"timediff.csv"
time<-read.csv(filename, sep=";",header=TRUE,dec=".")
2003 Apr 14
2
A statistical problem.Anybody can help me?
Sorry for the contents not relating to R.
Assume there are N i.i.d zero-mean complex gaussian random
variables(RVs),as w(i),0<=i<N} with known variance,from which one
can generate another N RVs,as
R(0)=sum over i {w(i)*w'(i)}
R(1)=sum over i {w(i+1)*w'(i)}
...
up to
R(N-1)= w(N-1)w'(i)
where w'(i) is the complex conjugate of w(i).
(from viewpoint of signal