How do I make my graphs show positive numbers? The binomial answers are all positive, but the graphs keep showing a negative.
Correct Code is :
shadeDist(xshade=0,ddist="dbinom",parm1 = 4,parm2=0.6,
xlab="Probability democrats win 0",main="Political Races")
shadeDist(xshade=1,ddist="dbinom",parm1 = 4,parm2=0.6,
xlab="Probability democrats win 1",main="Political Races")
shadeDist(xshade=2,ddist="dbinom",parm1 = 4,parm2=0.6,
xlab="Probability democrats win 2",main="Political Races")
shadeDist(xshade=3,ddist="dbinom",parm1 = 4,parm2=0.6,
xlab="Probability democrats win 3",main="Political Races")
shadeDist(xshade=4,ddist="dbinom",parm1 = 4,parm2=0.6,
xlab="Probability democrats win 4",main="Political Races")
You have to understand the arguments used by the function shapeDist .
The Main Arguments are :
ddist : Where you have to specify which distrubution you want to draw the pdf if , here it is dbinom . You have to input as a character , thus "dbinom" .
parm1 and parm 2 are the two parameters of the distribution , here n and p respectively .
xshade : The point where you want to start/end shading .
** In your code , as you have put wrong arguments , by default R chose "dnorm" in ddist argument thus showing negative value and a symmetric Normal distribution .
How do I make my graphs show positive numbers? The binomial answers are all positive, but...