Question

Theoph is a built-in R dataset. The Theoph data frame has 132 rows and 5 columns of data from an experiment on the pharmacoki

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Required R-Codes

## Answer using R

x=Theoph$conc
x

# a). To calculate median.
m=median(x)
m

# b). To plot Boxplot
boxplot(x,outline = FALSE)
boxplot.stats(x)

# c).To calculate Interquartile range
Iqr=IQR(x)
Iqr

# d). To calcute sample mean
Mn=mean(x)
Mn

# e).To calculate 10% trimmed mean
Mt=mean(x,trim=10)
Mt

# f). To compute sample variance of x
Sv=var(x)
Sv

# g). To calculate sample standard deviation
Sd=sd(x)
Sd

# h).
length(which(x>(mean(x)+1)))/length(x)*100
## Thus near about 40 % of x values are away from sample mean.

# i). To compure Range of x
R=max(x)-min(x)
R

# j). If we sum the values in x
Sum=sum(x)
Sum

R-Code Outputs generated as follows ;

> x=Theoph$conc
> # a). To calculate median.
> m=median(x)
> m
[1] 5.275
> # b). To plot Boxplot
> boxplot(x)

> boxplot.stats(x)
$stats
[1]  0.000  2.865  5.275  7.140 11.400

$n
[1] 132

$conf
[1] 4.687096 5.862904

$out
numeric(0)

> # c).To calculate Interquartile range
> Iqr=IQR(x)
> Iqr
[1] 4.2625
> # d). To calcute sample mean
>  Mn=mean(x)
>  Mn
[1] 4.960455
> # e).To calculate 10% trimmed mean
> Mt=mean(x,trim=10)
> Mt 
[1] 5.275
> # f). To compute sample variance of x
> Sv=var(x)
> Sv
[1] 8.22152
> # g). To calculate sample standard deviation
> Sd=sd(x)
> Sd
[1] 2.867319
> # h).
> length(which(x>(mean(x)+1)))/length(x)*100
[1] 40.15152
> # i). To compure Range of x
> R=max(x)-min(x)
> R
[1] 11.4
> # j). If we sum the values in x
> Sum=sum(x)
> Sum
[1] 654.78
Add a comment
Know the answer?
Add Answer to:
Theoph is a built-in R dataset. The Theoph data frame has 132 rows and 5 columns...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Theoph is a built-in R dataset. The Theoph data frame has 132 rows and 5 columns...

    Theoph is a built-in R dataset. The Theoph data frame has 132 rows and 5 columns of data from an experiment on the pharmacokinetics of theophylline. Thus, there are 132 measurements. We are interested in some descriptive statistics related to the conc variable of Theoph. We can access the data directly by using the assignment x <- Theoph$conc (In R use ?Theoph for info on this dataset.) The values of Theophsconc or x if defined as above are: [1] 0.74,...

  • Question 4) nhtemp is a built-in R dataset. The nhtemp data frame is a time series...

    Question 4) nhtemp is a built-in R dataset. The nhtemp data frame is a time series which gives the mean annual temperature in New Haven, Connecticut, from 1912 to 1970. Thus, there are 60 measurements. We are interested in some descriptive statistics related to nhtemp. We can access the data directly by using the assignment x <- nhtemp (In R use ?nhtemp for info on this dataset.) The values of nhtemp or x if defined as above are: [1] 49.9...

  • sunspot.year is a built-in R time series dataset which gives the mean yearly numbers of sunspots...

    sunspot.year is a built-in R time series dataset which gives the mean yearly numbers of sunspots from 1700 to 1988 rounded to one digit. This data is maintained up until the current date at WDC-SILSO, Royal Observatory of Belgium. We are interested in some descriptive statistics related to the sunspot.year time series. We can access this data directly and convert the time series into a vector by using the assignment x <- as.vector(sunspot.year). (In R use ?sunspot.year for info on...

  • The built-in R dataset swiss gives Standardized fertility measure and socio-economic indicators for each of 47...

    The built-in R dataset swiss gives Standardized fertility measure and socio-economic indicators for each of 47 French-speaking provinces of Switzerland at about 1888. The dataset is a data frame containing 6 columns (variables). The column Infant.Mortality represents the average number of live births who live less than 1 year over a 3-year period. We are interested in the Infant.Mortality column. We can convert the data in this colun to an ordinary vector x by making the assignment x <- swiss$Infant.Mortality....

  • 5. Consider the following data (You are allowed to use built-in function in R, but the...

    5. Consider the following data (You are allowed to use built-in function in R, but the code must be attached) X 99.0 101.1 102.7 103.0 105.4 107.0 108.7 110.8 112.1 112.4 113.6 113.8 115.1 115.4 120.0 y 28.8 27.9 27.0 25.2 22.8 21.5 20.9 19.6 17.1 18.9 16.0 16.7 13.0 13.6 10.8 (a) Obtain sample statistics such as sample mean of y and x and swa = n. 2-1(;- T)?, Say = n-1 =1(xi – 7)(yi – ). (b) Obtain...

  • 1. You have a dataset from a random sample of U.S. adults and are analyzing two...

    1. You have a dataset from a random sample of U.S. adults and are analyzing two variables measured as follows:Sex (0=male; 1=female) and Felony criminal record (0=no; 1=yes). Which statistic is most appropriate for describing the strength of the relationship between these two variables? Chi-square Phi-coefficient Goodman and Kruskal's gamma Yule's Q None of the above 2. A hypothesis test for the difference between two independent sample means assumes ____________. we have two samples that are independently selected we have...

  • My Ask You C-reactive protein (CRP) is a substance that can be measured in the blood. Values incr...

       My Ask You C-reactive protein (CRP) is a substance that can be measured in the blood. Values increase substantially within & hours of an infection and reach a peak within 24 to 48 hours after. In adults, chronically high values have been linked to an increased risk of cardiovascular disease. In a study of apparently healthy children aged 6 to 60 months in Papua New Guinea, CRP was measured in 90 children. The units are milligrams per liter (mg/l). Here...

  • K-means clustering K-means clustering is a very well-known method of clustering unlabeled data. The simplicity of...

    K-means clustering K-means clustering is a very well-known method of clustering unlabeled data. The simplicity of the process made it popular to data analysts. The task is to form clusters of similar data objects (points, properties etc.). When the dataset given is unlabeled, we try to make some conclusion about the data by forming clusters. Now, the number of clusters can be pre-determined and number of points can have any range. The main idea behind the process is finding nearest...

  • All of the following questions are in relation to the following journal article which is available...

    All of the following questions are in relation to the following journal article which is available on Moodle: Parr CL, Magnus MC, Karlstad O, Holvik K, Lund-Blix NA, Jaugen M, et al. Vitamin A and D intake in pregnancy, infant supplementation and asthma development: the Norwegian Mother and Child Cohort. Am J Clin Nutr 2018:107:789-798 QUESTIONS: 1. State one hypothesis the author's proposed in the manuscript. 2. There is previous research that shows that adequate Vitamin A intake is required...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT