Jane M. Horgan - Probability with R

Здесь есть возможность читать онлайн «Jane M. Horgan - Probability with R» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Probability with R: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Probability with R»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Provides a comprehensive introduction to probability with an emphasis on computing-related applications This self-contained new and extended edition outlines a first course in probability applied to computer-related disciplines. As in the first edition, experimentation and simulation are favoured over mathematical proofs. The freely down-loadable statistical programming language 
is used throughout the text, not only as a tool for calculation and data analysis, but also to illustrate concepts of probability and to simulate distributions. The examples in 
cover a wide range of computer science applications, including: testing program performance; measuring response time and CPU time; estimating the reliability of components and systems; evaluating algorithms and queuing systems. 
Chapters cover: The R language; summarizing statistical data; graphical displays; the fundamentals of probability; reliability; discrete and continuous distributions; and more. 
This second edition includes:
improved R code throughout the text, as well as new procedures, packages and interfaces; updated and additional examples, exercises and projects covering recent developments of computing; an introduction to bivariate discrete distributions together with the R functions used to handle large matrices of conditional probabilities, which are often needed in machine translation; an introduction to linear regression with particular emphasis on its application to machine learning using testing and training data; a new section on spam filtering using Bayes theorem to develop the filters; an extended range of Poisson applications such as network failures, website hits, virus attacks and accessing the cloud; use of new allocation functions in R to deal with hash table collision, server overload and the general allocation problem. The book is supplemented with a Wiley Book Companion Site featuring data and solutions to exercises within the book.
Primarily addressed to students of computer science and related areas, 
is also an excellent text for students of engineering and the general sciences. Computing professionals who need to understand the relevance of probability in their areas of practice will find it useful.

Probability with R — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Probability with R», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

This chapter introduces R and describes some of its basic operations and editing procedures. The syntax used to read and edit statistical data and to perform some basic statistical calculations is given.

It is not the intention to provide a complete set of features of the language, but rather to give a flavor of the structure of R and how to get help to proceed further. Additional features are introduced in later chapters as the need for them arises.

1.1 What Is R?

R is a data‐analysis system, a sophisticated calculator and an object‐oriented programming language. It provides an environment for statistical analysis and graphics that differs from standard statistical packages such as SPSS and Minitab; these provide point‐and‐click graphical‐user interfaces (GUIs), while R is command‐driven. Users type commands at a prompt, and the R interpreter responds.

It is possible to get quite far using R to execute simple expressions from the command line, and some users may never need to go beyond this. At a more advanced level, users write their own functions, either to systematize repetitive work or to develop add‐on packages for new functionality.

1.2 Installing R

R is obtained from the website called CRAN (Comprehensive R Archive Network) and is downloaded by proceeding as follows:

Go to the CRAN website at http://cran.r-project.org/;

Choose an operating system from Linux, (Mac) OS X, and Windows appropriate to your computer. In this book, we work in the Windows environment, click “Download R for Windows”;

Choose the “base” package;

Click “Download R 3.6.1”, which is the current version at the time of writing.

Press the option “Run.”

R is now installed, and you should see an “R” icon on your computer. Clicking on this will start up the standard R package.

1.3 R Documentation

R documentation is available at http://cran.r-project.org/manuals, where you will find the following manuals:

An Introduction to R gives an introduction to the language and how to use R for doing statistical analysis and graphics;

The R Language Definition documents the language per se, that is, the objects that it works on, and the details of the expression evaluation process, which are useful to know when programming R functions;

Writing R Extensions covers how to create your own packages, how to write R help files, and the foreign language (C, C++, Fortran, etc.) interfaces;

R Data Import/Export describes the import and export facilities available either in R itself or via packages that are available from CRAN;

R Installation and Administration;

R Internals is a guide to the internal structures of R and coding standards for the core team working on R itself;

The R Reference Index contains all help files of the R standard and recommended packages in printable form.

The documentation may be downloaded or browsed. We suggest that you download and obtain a hard copy of An Introduction to R by Venables et al. (2019) Version 3.6.1 (2019-07-05) and access the others as you require.

1.4 Basics

To familiarize yourself with R , you should work through the commands given below at a workstation to which R has been downloaded.

To start, either click on the R icon (if you have created a short cut on your screen) or go to “Programs,” select R , and then click on the R icon. When the R program is started, and after it prints an introductory message on the screen, the interpreter prompts for input with the command prompt “ картинка 67.”

Expressions that are typed at the command prompt are evaluated and printed. For example,

6+7*3/2

returns

[1] 16.5

To assign or store data, write

x <- 1:4

Here, the integers 1, 2, 3, 4 are assigned to the vector картинка 68. To check the contents of картинка 69, type

x

which returns

[1] 1 2 3 4

To square the elements of картинка 70, write

x2 <- x**2

or equivalently

x2 <- x^2

that causes each element in the vector картинка 71to be squared and stored in the vector картинка 72. To examine the contents of картинка 73, write

x2

which gives

[1] 1 4 9 16

To illustrate how R is case sensitive, consider

X <- 10 prod1 <- X*x prod1 [1] 10 20 30 40

Here, the integer 10 is stored in картинка 74. картинка 75causes each element of the vector картинка 76to be multiplied by 10.

Some points to note:

<���‐ is the assignment operator; in the illustration “ <���‐ 1: 4, the integers are assigned to the vector ;

R is case sensitive; for example, and represent different variables;

Variable names can consist of any combination of lower and upper case letters, numerals, periods, and underscores, but cannot begin with a numeral or underscore;

All the above examples of variables are numeric, but we shall see that R supports many other types of data.

The entities that R creates and manipulates are called objects . These include variables, arrays of numbers, strings, or functions.

All objects created in R are stored in what is known as the workspace .

1.5 Getting Help

The easiest way of getting help when you are working in the R environment is to click the Help button on the toolbar.

Alternatively, you can type

help()

for online help, or

help.start()

for an HTML browser interface.

It could be helpful to look at some demonstrations of R by typing

demo()

which gives a list of all available demonstrations.

Demonstrations on specific topics can be obtained by inserting an argument. For example,

demo(plotmath)

gives some examples of the use of mathematical notation.

A more specific way of getting help, when working in the R environment, is to type the name of the function you require. For example,

help(read.table)

will provide details on the exact syntactic structure of the instruction read.table.

An alternative is

?read.table

To obtain all that is available on a particular topic, use apropos.

apropos ("boxplot")

returns

"boxplot", "boxplot.default", "boxplot.stats"

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Probability with R»

Представляем Вашему вниманию похожие книги на «Probability with R» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Probability with R»

Обсуждение, отзывы о книге «Probability with R» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x