update top of histogram
This commit is contained in:
parent
9278ce8349
commit
16192861a0
2
main.go
2
main.go
|
@ -302,7 +302,7 @@ func printElectoralCollegeHistogram(samples []int) {
|
||||||
p := float64(count) / float64(len(samples)) * 100
|
p := float64(count) / float64(len(samples)) * 100
|
||||||
cp += p
|
cp += p
|
||||||
|
|
||||||
if i > 130 && i < 400 {
|
if i > 130 && i < 538 {
|
||||||
fmt.Printf("[ %2d, %4d): %s %.2f%% (%.0f%%)\n", i, i+1, barString(bar_length), p, cp)
|
fmt.Printf("[ %2d, %4d): %s %.2f%% (%.0f%%)\n", i, i+1, barString(bar_length), p, cp)
|
||||||
} else if p >= 0.01 {
|
} else if p >= 0.01 {
|
||||||
fmt.Printf(">0.01 probability outside of domain, you might want to change histogram parameters\n")
|
fmt.Printf(">0.01 probability outside of domain, you might want to change histogram parameters\n")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user