plot(1:4,dbinom(1:4,4,0.7),
type='h',
main='Binominal Distribution (n=4, p=0.7',
ylab='Probability',
xlab='# Successes',
lwd=3,xaxt="n")
Asked
Active
Viewed 597 times
0

Gabriel Cardoso
- 5
- 1
-
Sorry for off-topic, I saw your other post that you deleted regarding drawing a pie-chart for Municipality/Competitor/MarketOwned. I was half-way-done for it. Decided to send you [my solution, code is here](https://cutt.ly/HgIAx8C) by this link. – Arty Oct 31 '20 at 15:44
1 Answers
1
This should work:
y <- dbinom(1:4,4,0.7)
plot(1:4,y,
type='h',
col = ifelse(y == max(y), "red", "black"),
main='Binominal Distribution (n=4, p=0.7',
ylab='Probability',
xlab='# Successes',
lwd=3,xaxt="n")

DaveArmstrong
- 18,377
- 2
- 13
- 25