TU Wien:Statistik und Wahrscheinlichkeitstheorie UE (Bura)/Übungen 2019W/5.2

Aus VoWi
Zur Navigation springen Zur Suche springen
(2) Boxplot

Two novel randomized algorithms (A and B) are to be compared regarding their running time. Both algorithms were executed n times. The running times (in seconds) are stored in the file runningtimes.csv.

(a) Set the working directory and load the data using read.csv(). Create a boxplot to compare the running times. Color the boxes and add proper notations (axes notations, title etc.). More info via ?boxplot
(b) Comment on the following statements / questions only using the graphic
(a) The first quartile of the times in A was about?
(b) the interquartile range of the times in B is about trice the interquartile range of A
(c) Is n = 100?
(d) More than half of the running times in B were faster than 3/4 of the running times in A
(e) At least 50% in A were faster than the 25% slowest in B
(f) At least 60% in A were faster than the 25% slowest in B

Lösungsvorschlag von Draggy[Bearbeiten | Quelltext bearbeiten]

(a) Laden des Datasets :

runningtimes = read.csv('runningtimes.csv')

Boxplot erstellen:

boxplot(runningtimes, ylab = "Runtime", col=8)

(b)

(a) The first quartile of the times in A was about?
(b) the interquartile range of the times in B is about trice the interquartile range of A
Ja. In der Angabe ist wohl ein Typo (trice => twice).
(c) Is n = 100?
Der Boxplot gibt keine Auskunft über die Größe der Datenmenge.
(d) More than half of the running times in B were faster than 3/4 of the running times in A
Stimmt, der Median von B liegt tiefer als das 1. Quantil von A.
(e) At least 50% in A were faster than the 25% slowest in B
Stimmt, da das 3. Quantil von B höher liegt als der Median von A.
(f) At least 60% in A were faster than the 25% slowest in B.
Stimmt Kann nicht bestimmt werden - Die Elemente im dritten Quartil müssen nicht gleichmäßig angeordnet sein, dadurch kann nicht festgestellt werden, wie viele Elemente unter der Grenze liegen.