[SOLVED] UCS410 Lab 7-Chi-square, t-distribution, F-distribution

30.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

Probability and Statistics(UCS410) Exp. sheet 07 (Chi-square, t-distribution, F-distribution)
————————————————————————————————————————————
(1) Use the rt(n,df) function in r to investigate the t-distribution for n = 100 and df = n − 1 and plot the histogram for the same.
(2) Use the rchisq(n,df) function in r to investigate the chi-square distribution with n = 100 and df = 2,10,25.
(3) Generate a vector of 100 values between -6 and 6. Use the dt() function in r to find the values of a t-distribution given a random variable x and degrees of freedom 1,4,10,30. Using these values plot the density function for students t-distribution with degrees of freedom 30. Also shows a comparison of probability density functions having different degrees of freedom (1,4,10,30).
(4) Write a r-code
(i) To find the 95th percentile of the F-distribution with (10,20) degrees of freedom.
(ii) To calculate the area under the curve for the interval [0,1.5] and the interval [1.5,+∞) of a F-curve with v1 = 10 and v2 = 20 (USE pf()).
(iii) To calculate the quantile for a given area (= probability) under the curve for a F-curve with v1 = 10 and v2 = 20 that corresponds to q = 0.25,0.5,0.75 and 0.999. (use the qf())
(iv) To generate 1000 random values from the F-distribution with v1 = 10 and v2 = 20 (use rf())and plot a histogram.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.