Practice Questions

  1. To investigate how many hours students sleep each day, a researchers asked 100 students. The data for the first 20 students are 7.0 9.5 9.0 8.5 7.5 7.5 8.5 8.0 8.0 9.0 6.5 7.0 8.0 8.5 9.5 5.5 8.0 8.0 8.5 7.5. Using the data, do the following/answer the following questions:
    • Get the data into R.
    • On average, how many hours students sleep?
    • What is the percentage of students who sleep more than 8 hours? Percentage no less than 8 hours?
    • How many different response values in the data? What are their frequency?
    • Change the 2nd value to 8.0 and the 10th value to 6 and conduct above analysis again.

To cite the book, use: Zhang, Z. & Wang, L. (2017-2025). Advanced statistics using R. Granger, IN: ISDSA Press. https://doi.org/10.35566/advstats. ISBN: 978-1-946728-01-2.
To take the full advantage of the book such as running analysis within your web browser, please subscribe.