Читать книгу Statistics and Probability with Applications for Engineers and Scientists Using MINITAB, R and JMP - Bhisham C. Gupta, Irwin Guttman - Страница 82

MINITAB

Оглавление

1 Enter the data in column C1.

2 From the Menu bar, select Stat Basic Statistics Display Descriptive Statistics. This prompts the following dialog box to appear on the screen:

3 In this dialog box, enter C1 in the box under variables and click at the box Statistics. Then, the following dialog box appears:In this dialog box, check the statistics you would like to determine (for instance, we checked Mean, Mode, Median, Variance, Standard Deviation, Minimum, Maximum, and Range) and then click OK, again, click OK. The numerical measures shown below appear in the Session window:

USING R:

We can use the built in ‘summary()’ function in R to get basic summary statistics. However, the extra functions ‘mean()’, ‘sd()’, ‘var()’, and ‘median()’ are used to calculate the sample mean, standard deviation, variance, and median, respectively. The mode can be obtained using the manual calculation specify in the following R code. The task can be completed by running the following R code in the R Console window.

data = c(6, 8, 12, 9, 14, 18, 17, 23, 21, 23) #To obtain summary statistics summary(data)

Min. 1st Qu. Median Mean 3rd Qu. Max.
6.00 9.75 15.50 15.10 20.25 23.00

#To obtain the mean, median, standard deviation, and variance mean(data) 15.1 median(data) 15.5 sd(data) 6.261878 var(data) 39.21111 # To obtain the mode names(table(data))[table(data) == max(table(data))] “23”

Statistics and Probability with Applications for Engineers and Scientists Using MINITAB, R and JMP

Подняться наверх