7.26 Number of Friends on Facebook

  1. The data is only skewed slightly. There are no obvious outliers, as indicated by the graphs displayed without the log. Also, the sample size is large, as desired by an approximately Normal distribution. Thus, I do believe the data is approximately Normally distributed. I included the log graphs though because they do make the data look more Normally distributed and I needed the practice.
facebookfriends <- read.table("http://homepages.gac.edu/~anienow2/MCS_142/Data/facebookfriends.csv", header=TRUE, sep=",") 

You can also embed plots, for example:

hist(facebookfriends$Friends, main="Distribution of Number of Friends on Facebook", xlab="Friends")

log.friends=log(facebookfriends$Friends)
hist(log.friends)

boxplot(facebookfriends$Friends, main="Boxplot of Number of Friends on Facebook", horizontal=TRUE, xlab="Friends")

boxplot(log.friends, main="Log Boxplot of Number of Friends on Facebook", horizontal=TRUE)

qqnorm(facebookfriends$Friends, main="Normal Q-Q Plot of Number of Friends on Facebook")

qqnorm(log.friends, main="Log Normal Q-Q Plot of Number of Friends on Facebook")

  1. Because the sample was taken at random from a large population, it is appropriate to use the t methods of this section to compute a 95% confidence interval for the mean number of Facebook users at this large university. Large samples are desired and help overcome the slight skewness of the data. There are also no obvious outliers, so that makes the t methods appropriate as well.

  2. The mean is 119.0667. The standard deviation is 29.5669122. The standard error is 5.3982. The critical value for 95% confidence is t = 2.045. The margin of error is 11.04.

  3. The 95% confidence interval is between 108.0262 and 130.1071 for the average number of friends for Facebook users at this large university.

friends.t <- t.test(facebookfriends$Friends, conf.level=.95, alternative = "two.sided") 
friends.t
## 
##  One Sample t-test
## 
## data:  facebookfriends$Friends
## t = 22.0569, df = 29, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  108.0262 130.1071
## sample estimates:
## mean of x 
##  119.0667

7.27 Random distribution of trees t test

  1. The distribution is not Normally distributed, as indicated by a histogram, a boxplot, and a Normal quantile plot (see below). Both a normal and log method was used to create the three graphs, and each showed a skewed distribution. Especially looking at the Normal quantile plot, we see a curved line, where as a Normally distributed dataset would produce a straight (ish) line. The five-number summary is 2.2, 10.95, 28.5, 41.9, 69.3.
treediameter <- read.table("http://homepages.gac.edu/~anienow2/MCS_142//Data/treediameter.csv", header=TRUE, sep=",")
hist(treediameter$diameter, main="Distribution of Tree Diameter", xlab="Diameter cm")

log.trees=log(treediameter$diameter)
hist(log.trees, main="Log Distribution of Tree Diameter", xlab="Diameter cm")

boxplot(treediameter$diameter, main="Boxplot of Tree Diameter", horizontal=TRUE, xlab="Diamter cm")

boxplot(log.trees, main="Log Boxplot of Tree Diameter", horizontal = TRUE, xlab="Diameter cm")

qqnorm(treediameter$diameter, main="Normal Q-Q Plot of Tree Diameter")

qqnorm(log.trees, main="Log Normal Q-Q Plot of Tree Diameter")

  1. In my opinion, I do not believe it is appropriate to use the methods of this section to find a 95% confidence interval for the mean DBH of the trees in the Wade Tract because while the sample is large, it is not taken from an extremely large population.

  2. The mean is 27.29. The standard deviation is 17.7058414. The margin of error is 5.7166. The 95% confidence interval for the tree distribution is 21.6274 to 32.9526 cm.

trees.t <- t.test(treediameter$diameter, conf.level=.95, alternative = "two.sided")
trees.t
## 
##  One Sample t-test
## 
## data:  treediameter$diameter
## t = 9.748, df = 39, p-value = 5.245e-12
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  21.6274 32.9526
## sample estimates:
## mean of x 
##     27.29
  1. In my opinion, I do not think these results would apply to other similar trees in the same area because at the moment, there is no way to determine if the trees in this study act as representatives for trees elsewhere.