#### Overview of this book

Data Science with R aims to teach you how to begin performing data science tasks by taking advantage of Rs powerful ecosystem of packages. R being the most widely used programming language when used with data science can be a powerful combination to solve complexities involved with varied data sets in the real world. The book will provide a computational and methodological framework for statistical simulation to the users. Through this book, you will get in grips with the software environment R. After getting to know the background of popular methods in the area of computational statistics, you will see some applications in R to better understand the methods as well as gaining experience of working with real-world data and real-world problems. This book helps uncover the large-scale patterns in complex systems where interdependencies and variation are critical. An effective simulation is driven by data generating processes that accurately reflect real physical populations. You will learn how to plan and structure a simulation project to aid in the decision-making process as well as the presentation of results. By the end of this book, you reader will get in touch with the software environment R. After getting background on popular methods in the area, you will see applications in R to better understand the methods as well as to gain experience when working on real-world data and real-world problems.
Table of Contents (18 chapters)
Simulation for Data Science with R
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Free Chapter
Introduction
R and High-Performance Computing
The Discrepancy between Pencil-Driven Theory and Data-Driven Computational Solutions
Simulation of Random Numbers
Monte Carlo Methods for Optimization Problems
Probability Theory Shown by Simulation
Resampling Methods
Applications of Resampling Methods and Monte Carlo Tests
The EM Algorithm
Simulation with Complex Data
System Dynamics and Agent-Based Models
Index

## Condition of problems

Other well-known problems of rounding errors are described in the foundations of computational mathematics. In the following, we consider another rounding problem that is related to the numerical precision of matrix operations. For the condition of a problem, in most cases, the reciprocal condition number is estimated in computer programs. The smaller the reciprocal condition number (or the higher the condition number), the worse is the condition of the problem.

The 2-norm condition number (in R it is `kappa()`) represents the ratio of the largest to the smallest non-zero singular value of a matrix, while `rcond()` computes an approximation of the reciprocal condition number; take a look at the details.

A poorly conditioned problem is, for example, as follows:

```library("Matrix")
## reciprocal approximate condition number
rcond(Hilbert(9)) ## worse
## [1] 9.0938e-13
## reciprocal condition number
x1 <- cbind(1, 1:10)
head(x1, 3)
##      [,1] [,2]
## [1,]    1    1
## [2...```