100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
3. Introduction to R - Probability functions and Tables R50,00   Add to cart

Presentation

3. Introduction to R - Probability functions and Tables

1 review
 88 views  0 purchase

Step by step walkthrough covering the use of the following functions rnorm() pnorm() rexp() pexp() pbinom() dbinom() ppois() table() tapply() sd() prop.table() Examples are provided along with questions and answers. link to sample data is provided in the presentation

Preview 10 out of 65  pages

  • July 8, 2018
  • 65
  • 2017/2018
  • Presentation
  • Unknown
All documents for this subject (5)

1  review

review-writer-avatar

By: jonassimpe • 5 year ago

avatar-seller
dominique13
Introduction to R –
Probabilities and tables
Link to the data used is provided

,Let’s start at the beginning
• Open RStudio; create a new script
• Clear R’s memory
• Set your working directory to the same folder you used for the oth
sessions

,Let’s start at the beginning
• Open RStudio; create a new script
• Clear R’s memory
rm(list=ls())

• Set your working directory to the same folder you used for the oth
sessions
setwd(“C:/Users/dtros/Documents/Using R/Session 1”)

,
,Probability Distributions
R has functions for a variety of probability distributions

,Function rnorm()
• To begin let’s find out what rnorm() is
• Bring up this functions help file

,
,Function rnorm()
• To begin let’s find out what rnorm() is
• Bring up this functions help file
• Were you able to do it? Remember that you can bring up a functio
help file using
?rnorm
• This is the last function in the list for ‘Normal Distribution’
• The description of rnorm() is as follows – rnorm() generates
random numbers that are from a normal distribution
• Run the following
x <- rnorm(100000, mean = 0, sd = 1)

,
, Function rnorm()
• Run the following
x <- rnorm(100000, mean = 0, sd = 1)

• As you can see, including spaces does not make a difference at this
point, as long as you have used the correct arguments and have
placed them in the correct order
• This line of code has produced 100 000 values from a standard
normal distribution; with a mean of 0 and a standard deviation of 1

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller dominique13. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R50,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76669 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R50,00
  • (1)
  Buy now