trl.la
October 13, 2020, 6:00pm
1
Hello,
I'm not sure what I did wrong, but my graphs are not showing up correctly once I run the code. Please help me figure out what's the problem is.
This is my code and graphs
x = rnorm(1000,4,1);x
xbar = {}
for (i in 1:100)
{
x = sample(x,50);
xbar[i] = mean(x);
}
print(xbar)
par(mfrow = c(2,2))
plot(xbar)
hist(xbar)
qqnorm(xbar)
qqline(xbar)
trl.la
October 13, 2020, 6:01pm
2
This is what the graphs are supposed to look like
jms
October 13, 2020, 6:34pm
3
Hi,
There is nothing wrong with your graphs, they do exactly what they should do.
But you should have a look at xbar
before plotting it. The problem lies within the method you are using to produce your data.
trl.la
October 13, 2020, 7:36pm
4
Thank you so much! I found out what I did wrong with the xbar
system
Closed
October 20, 2020, 7:36pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.