up to cum rel freq dist
This commit is contained in:
parent
ad72881793
commit
3477ee16ef
Binary file not shown.
@ -170,3 +170,67 @@ interval.freq = table(interval.cut)
|
|||||||
interval.cumfreq = cumsum(interval.freq)
|
interval.cumfreq = cumsum(interval.freq)
|
||||||
hist(interval.cumfreq)
|
hist(interval.cumfreq)
|
||||||
q()
|
q()
|
||||||
|
duration = faithful$eruptions
|
||||||
|
breaks = seq(1.5, 5.5, by=0.5)
|
||||||
|
duration.cut = cut(duration, breaks, right=FALSE)
|
||||||
|
duration.freq = table(duration.cut)
|
||||||
|
cumfreq0 = c(0, cumsum(duration.freq))
|
||||||
|
plot(breaks, cumfreq0, main="Old Faithful Eruptions", xlab="Duration minutes", ylab="Cumulative Eruptions")
|
||||||
|
lines(breaks, cumfreq0)
|
||||||
|
intervals = faithful$waiting
|
||||||
|
faithful$waiting
|
||||||
|
cbind(faithful$waiting)
|
||||||
|
faithful$waiting / nrow(faithful)
|
||||||
|
faithful$waiting / nrow(faithful$waiting)
|
||||||
|
intervals
|
||||||
|
breaks
|
||||||
|
intervals.cut = cut(breaks, intervals)
|
||||||
|
help(cut)
|
||||||
|
intervals.cut = cut(intervals, breaks)
|
||||||
|
intervals.cut
|
||||||
|
intervals.cut
|
||||||
|
intervals.freq = table(intervals.cut)
|
||||||
|
intervals.cut = cut(intervals, breaks, right=FALSE)
|
||||||
|
intervals.freq = table(intervals.cut)
|
||||||
|
cumfreq0 = c(0, cumsum(intervals.freq))
|
||||||
|
cumfreq0
|
||||||
|
intervals
|
||||||
|
intervals.cut = cut(intervals, breaks, right=FALSE)
|
||||||
|
intervals.cut
|
||||||
|
intervals.freq = table(intervals.cut)
|
||||||
|
intervals.freq
|
||||||
|
cbind(intervals.freq)
|
||||||
|
plot(breaks, cumfreq0)
|
||||||
|
intervals
|
||||||
|
cut(intervals, breaks)
|
||||||
|
cut(intervals, breaks, right=FALSE)
|
||||||
|
duration
|
||||||
|
cut(duration, breaks)
|
||||||
|
breaks = seq(0, 100, by=10)
|
||||||
|
breaks
|
||||||
|
cut(intervals, breaks)
|
||||||
|
intervals.cut = cut(intervals, breaks)
|
||||||
|
intervals.cut = cut(intervals, breaks, right=FALSE)
|
||||||
|
intervals.cut
|
||||||
|
intervals.freq = table(intervals.cut)
|
||||||
|
cumfreq0 = c(0, cumsum(intervals.freq))
|
||||||
|
cumfreq0
|
||||||
|
plot(breaks, cumfreq0)
|
||||||
|
lines(breaks, cumfreq0)
|
||||||
|
intervals
|
||||||
|
min(intervals)
|
||||||
|
max(intervals)
|
||||||
|
breaks = seq(40.0, 100.0, by=5.0)
|
||||||
|
intervals.cut = cut(intervals, breaks, right=FALSE)
|
||||||
|
intervals.cut
|
||||||
|
floor?
|
||||||
|
help(floor)
|
||||||
|
intervals.freq = table(intervals.cut)
|
||||||
|
intervals.freq
|
||||||
|
cumfreq0 = c(0, cumsum(intervals.freq))
|
||||||
|
cumfreq0
|
||||||
|
plot(breaks, cumfreq0)
|
||||||
|
lines(breaks, cumfreq0)
|
||||||
|
plot(breaks, cumfreq0, main="Old Faithful Intervals", xlab="Interval minutes", ylab="Cumulative Intervals")
|
||||||
|
lines(breaks, cumfreq0)
|
||||||
|
q()
|
||||||
|
Loading…
Reference in New Issue
Block a user