MATH 1280-01 Learning Journal Unit 5
MATH 1280-01 Learning Journal Unit 5
I reviewed the Basic R commands that I learned in the previous week and revised
23/2/2022 extensively in preparation for the unit 6 graded quiz. I did not encounter any challenges.
I reviewed the learning objectives for the week and drafted a timetable to facilitate my
studies for the week.
I completed my discussion post for unit 5 and posted it to the discussion forum. I did not
24/2/2022 encounter any challenges.
I took an hour-long coding challenge.
I studied binomial, Poisson, and exponential random variables extensively. I reviewed a few
YouTube videos to gain a deeper understanding of them, including how to compute their
25/2/2022 expectations and variances. I did not encounter any challenges.
I went through my peers' posts in the discussion forum, rated the posts of three peers
accordingly, and gave feedback. I then completed my assignment for the week and posted
it.
I studied the R functions that produce the probabilities of binomial, poisson, and
exponential random variables and their cumulative probabilities. I then undertook a few
programming tasks. I had a few challenges here and there while coding, but I would
ultimately overcome these challenges by identifying the source of errors in my codes and
27/2/2022 correcting them.
I studied the frequency, relative frequency, and summary function in R. I then attempted
28/2/2022 my unit 2 learning journal for the first time.
1/3/2022 I went through the discussion posts again to learn from other peers' posts.
2/3/2022 I completed my peer-assessed assignments and submitted them.
I completed my Unit 5 learning journal and attempted the self-quizzes several times to
ensure that I prepared well for the graded upcoming quiz. I did not find any challenges in
these tasks
The binomial distribution can be used to calculate the chance of achieving a specific number of successes,
such as successful basketball shots, from a given number of trials. To find discrete probabilities, we use
the binomial distribution.
3. 3. Task
Run these commands in R, then use your own words to describe what the resulting
numbers represent. You can get some information about the functions by using the
help commands in R (such as ?pbinom to get information about the pbinom() command
in R):
Using R software:
[1] 0.9975618
The function pbim() returns the number (value) of the cumulative probability of the binomial
distribution given the variables q = 5m, the number of trials (size=10), and the probability of
each result (prob=1/6). The output (0.9975618) implies that, out of the number of trials, there is
almost a 100% (99.75618%) probability that any number that leads up to 5 will be picked.
b)
n=10
p=.5
x=9
pbinom(x, n, p)
Using R software:
> n=10
> p=.5>
x=9
>pbinom(x, n, p)
[1] 0.9990234
Just like part (a) above, the number 0.9990234 is the cumulative probability of the binomial.
However, there is a bit of modification in that the values of x, n, and p are separately assigned in
this case.
Using R software:
[1] 0.1111111
The cumulative density function for a uniform distribution is provided by the function punif(). It
calculates the area to the left of 5 for a uniform distribution with a minimum of 1 and a maximum of 10.
When this command is executed individually, the area to the left that is x=5 and the area to the left that is
x=4 are computed. What happens here is that the area difference between these two numbers, x=5 and
x=4, will eventually supply the area between these two numbers. A brief run in R is shown here:
> punif(5,min=1,max=10)
[1] 0.4444444
> punif(4,min=1,max=10)
[1] 0.333333
As a result of the R output, we've come to the following conclusions: 0.4444444 – 0.3333333 =
0.1111111 punif(5, min=1,max=10) – punif(4,min=1,max=10) = 0.4444444 – 0.3333333 = 0.1111111
punif(5, min=1,max=10)
References
Yakir. B, (2011). Introduction to Statistical Thinking (With R, Without Calculus). Retrieved from
https://my.uopeople.edu/pluginfile.php/1097279/mod_book/chapter/267923/
MATH1280RInstallNotes.pdf