This books, absolutely the worst book, I have ever seen on this topic. Here is a good one, use this https://www.openintro.org/book/os/
The biggest problem with this book, it does not explain why the model is so, then some code is provided and bad libraries of r are used. Don't wast you time on this book