Using R, plot the gamma density function with parameters a = 2.2, 5= 1.3 on interval (0,7).
Using R, plot the gamma density function with parameters a = 2.2, 5= 1.3 on interval (0,7).
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
Please provide a source code that can be copied into R programming.
An example code is provided below, please use that as a reference.

Transcribed Image Text:Using R, plot the gamma density function with parameters \( \alpha = 2.2 \), \( \beta = 1.3 \) on interval \( (0, 7) \).

Transcribed Image Text:Using R-code we can plot the following gamma density function with parameters \((\alpha = 0.8, \beta = 0.5)\).
```r
x <- seq(0.01, 4, 0.01)
y <- dgamma(x, 0.8, 0.5)
plot(x, y, type = "l", col = "blue")
```
**Explanation:**
- `x <- seq(0.01, 4, 0.01)`: This line generates a sequence of numbers from 0.01 to 4, with an increment of 0.01.
- `y <- dgamma(x, 0.8, 0.5)`: This calculates the gamma density for each value in `x` using a shape parameter \(\alpha = 0.8\) and scale parameter \(\beta = 0.5\).
- `plot(x, y, type = "l", col = "blue")`: This command plots the gamma density function with a line type (`type = "l"`) and a blue color (`col = "blue"`).
Expert Solution

Step 1
Gemma is continuous distribution.
Step by step
Solved in 3 steps with 2 images

Recommended textbooks for you

MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc

Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning

Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning

MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc

Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning

Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning

Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON

The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman

Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman