Maths assignment PDF

Title Maths assignment
Course Statistics for Life and Social Science
Institution University of New South Wales
Pages 5
File Size 214.4 KB
File Type PDF
Total Downloads 50
Total Views 156

Summary

Computing Assignment...


Description

Question 1 1a) i. Calculate the sample mean and sample standard deviation of your sample of DD measurements. Mean = mean (Data$DD) = 7.571579 Standard deviation = sd(Data$DD) =1.751809 ii) Sample size = 19 b) boxplot((Data$DD), main="Difference in Days between Harvesting Dates", ylab="Difference in days")

Figure 1 c) In Figure 1, graphically represents the difference in days between the harvesting date of each year compared to the first year Shape – The shape is shown to be left skewed as the median separates the box and having majority of the area left side. Location – The median is located at about 7.7 days. Spread – The range of difference in days is quite large, ranging from about 4.2 days to 10.8 days (exceeding the scale). Since it is quite large, it may not be as reliable to see the difference in days. The IQR is about 2 days, ranging from about 6.4 to 8.5 difference in days. Outliers – There are no apparent outliers in this graph. d) qqnorm((Data$DD), main="Distribution of Days", xlab="Normal Quantiles", ylab="Sample Quantiles”)

qqline(Data$DD)

Figure 2 e) Figure 2 is shown to have a good degree of normal approximation. It is approximately normally distributed and follows close to a straight line as shown in Figure 2, despite a few minor outliers.

Question 2 2) a) mean(Data$DD) [1] 7.571579 > sd(Data$DD) [1] 1.751809 Let a = sample mean, s = sample standard deviation, n = sample size > a=7.571579 > s=1.751809 > n=19 > error=qt(0.975,df=n-1)*s/sqrt(n) > left=a-error > right=a+error > left [1] 6.727234 > right

[1] 8.415924 Therefore, to 3 decimal places the Confidence level lower limit: 6.727 Confidence level higher limit: 8.416 b) No, since the values of the interval are between 6.727 and 8.416 (0 is not included) c) The 95% confidence interval means that 95 times out of 100 we can expect that our estimated mu will be inside of our confidence interval, between the values of 6.727 and 8.416. This interval does not include the value 0, and thus it can be inferred that we are 95% confident the grapes ripened between 6.727 and 8.416 days before the second Saturday in February from previous years. This evidently supports George’s claim that climate change and higher temperatures is causing the grapes to be ripened earlier and also increase in wine acidity.

Question 3 3) a) qqnorm((Data$WA), main="Wine Acidity", xlab="Normal Quantities", ylab="Sample Quantiles") qqline(Data$WA)

Figure 3 b) Based on figure 3, there is conclusive evidence that the sample follows a good normality assumption. This is evident as the data closely follows close to a linear line. c) Null Hypothesis: µ = 3.2

Alternate Hypothesis: µ ≠ 3.2 T statistic: T =

´X−❑0 S / √n

(3.38 – 3.2) / (0.3009245 / sqrt(19)) = 2.607 (3d.p) Sampling distribution: 18 degrees of freedom (n-1) >2*pt(-abs(2.607304523), df=19-1) [1] 0.01782344 The p-value is equal to 0.01782344 Summary Since the p-value is less than 0.05, the null hypothesis can be rejected in favour of the alternate hypothesis. Thus, it is viable to conclude that WA ≠ 3.2. d)  

The samples (i.e. Jessica and Maria’s grapes) are independent of each other. The distribution is approximately normal.



The first assumption is satisfied as the samples are independent due to Jessica’s grapes having no impact on Maria’s. (randomly select vineyards) As concluded in part b), the measurements are approximately normally distributed. It is difficult to determine because we don’t know if the sampling design is a simple random sample

e)

 

Question 4

4) a) plot((Data$WA~Data$JM),names.arg=c("Jessica","Maria"), main="Wine acidity vs Grape type", xlab="Grape Type (Name of supplier)", ylab="Wine Acidity (pH)")

Figure 4 b) Figure 4 shows the relationship between the type of grape and its wine acidity. Shape – For Grape Type J, the shape is shown to be left skewed as majority of the area in the box is on the left, separated by the median line. Whereas for Grape Type M, the shape is shown to be right skewed as majority of the area in the box is on the right, separated by the median line. Location – The median for Grape Type J, is located at about pH of 3.32 whereas the median for Grape Type M is located higher at about pH of 3.7. Spread – The spread of Grape Type J is much larger, ranging from about 2.77 to 3.67 whereas Grape Type M has no whiskers, with just the box ranging from 3.67 to 3.83. This shows that Grape Type M is much more reliable as it shows a smaller range of results, making the results more accurate. IQR of Grape Type J is about 0.29, ranging from about 3.1 to 3.39 whereas the IQR is about 0.2, Grape Type M as there are no whiskers ranges from 3.67 to 3.83. Outliers – There are no apparent outliers in Grape Type G, whereas in Grape Type M, there is a one outlier. This could mean that there is a cofounding factor impacting the reliability of the grape type....


Similar Free PDFs