100% Zufriedenheitsgarantie Sofort verfügbar nach Zahlung Sowohl online als auch als PDF Du bist an nichts gebunden 4.2 TrustPilot
logo-home
Zusammenfassung

Summary - Computational probability with R (MAS2906)

Bewertung
-
Verkauft
-
seiten
16
Hochgeladen auf
24-04-2025
geschrieben in
2024/2025

Topics covered: • Discrete and continuous random variables • Probability distributions (Binomial, Poisson, Normal, etc.) • Expectation, variance, and moments • Law of Large Numbers and Central Limit Theorem • Monte Carlo simulation • Generating random variables in R • Visualisation and interpretation of results in R

Mehr anzeigen Weniger lesen
Hochschule
Kurs










Ups! Dein Dokument kann gerade nicht geladen werden. Versuch es erneut oder kontaktiere den Support.

Schule, Studium & Fach

Hochschule
Studium
Unbekannt
Kurs

Dokument Information

Hochgeladen auf
24. april 2025
Anzahl der Seiten
16
geschrieben in
2024/2025
Typ
Zusammenfassung

Themen

Inhaltsvorschau

,Week 1 and 2


1) Data
types
:




Logical (true/false)
·




· Character
("string") "data"

·
Double (5 0) .
X = 5 0 .




·

Infinity (infl 2 = 5/0




2) Vectors :

Va C(10
,
20
,
30)
w



naming the vector

VIa second
elementS o the output is 20


3) Data frames :

Each row represents a case or observation Examples to find how
many
we use :



and each column represents a variable sum (names column = = 1)

simple code: data. frame (column 1 Column 2)
name ,
eghow many "action" movies
to see specific rows and columns we use: sum (data s action = = 1)

name[ ,
I which command

raclumn which (name I
budget == max (movies Sbudget ,narm-Truel)
um

7 [2 3]
egname[3 ,
name ,
ignore N A
.





all colums ot row 3 row 2 column 3
,




To find a specific column name we use
,
$ Graphical and numerical summaries


name height (access the
heightcolumn) code : ( S
eg summary
we can do plots from the data frames Wit min 1st median , mean 3rd q , max
gives
·
, q , ,



1) For
histogram : his+ (x)

2) For boxplot : boxplot(x)

(namecolumn "blue")
eg hist ,
breaks-
-
"Sturges" -
col =




default , optional number

4)
Writing functions :
default arguments
-
square s function()E add function (a
1 b
,
= = a) [

return (x" 2) return (a +b)



3 3

square (5) add()
W
so"This wil I return 25
will return 3

, 5) Conditionals and loops :


·
If statements


x= 5


If (xx0)[


print ("positive")

3
·
If-else statements

If the if the condition is false it will allow an alternative condition.


X -
3



If (x > 0) [

print ("positive")

Yelsed
print ("negative")
3
·
If-else - if statements


multiple conditions to be checked



syntax
:




if (condition 1) [

#
code if cone 1 istrue


Jelseif (condition2)E
# code if condit 2 is true
.




JelseE
# code if
nothing above
is true


3


·
For loops

used to repeat a block of code for afixed number of iterations. example
total o

syntax
:



for (variable in sequence) [ for (J in-5 : -1) E

# code to execute in each iteration total <total + exp(j) /ja
3 3

print (total)
$7.46
Vollständigen Zugriff auf das Dokument erhalten:

100% Zufriedenheitsgarantie
Sofort verfügbar nach Zahlung
Sowohl online als auch als PDF
Du bist an nichts gebunden

Lerne den Verkäufer kennen
Seller avatar
corinageorgiou

Lerne den Verkäufer kennen

Seller avatar
corinageorgiou University of Glasgow (Scotland)
Folgen Sie müssen sich einloggen, um Studenten oder Kursen zu folgen.
Verkauft
0
Mitglied seit
2 Jahren
Anzahl der Follower
0
Dokumente
7
Zuletzt verkauft
-

0.0

0 rezensionen

5
0
4
0
3
0
2
0
1
0

Kürzlich von dir angesehen.

Warum sich Studierende für Stuvia entscheiden

on Mitstudent*innen erstellt, durch Bewertungen verifiziert

Geschrieben von Student*innen, die bestanden haben und bewertet von anderen, die diese Studiendokumente verwendet haben.

Nicht zufrieden? Wähle ein anderes Dokument

Kein Problem! Du kannst direkt ein anderes Dokument wählen, das besser zu dem passt, was du suchst.

Bezahle wie du möchtest, fange sofort an zu lernen

Kein Abonnement, keine Verpflichtungen. Bezahle wie gewohnt per Kreditkarte oder Sofort und lade dein PDF-Dokument sofort herunter.

Student with book image

“Gekauft, heruntergeladen und bestanden. So einfach kann es sein.”

Alisha Student

Häufig gestellte Fragen