This is a question regarding using logistic regression, and relating it to gaussian distribution or a binomial distribution.
model<-glm(target~ x1, data=data, type='response', family='binomial') model<-glm(target~ x1, data=data, type='response') #defaults to gaussian
My understanding of binomial is that it is
theta=chance of success z=trails ending in success k=trials ending in failure (theta^z)*(1-theta)^k
And something Gaussian is
theta = standard deviation x = success u = mean Y = [ 1/σ * sqrt(2π) ] * e -(x - μ)2/2σ2
So I understand how to do GLM with R, I kind of understand what binomial and gaussian means, but I have no understanding of how you relate binomial or gaussian to logistic regression, and how binomial and gaussian are different in this context.
Question 1- Can someone explain the intuition behind how "family='binomial'" is used when building a model with GLM?
Question 2- Given that the shapes of a binomial distribution and a gaussian distribution look very much the same (they both peak in the middle and gradually go down towards the ends), how does choosing either binomial or guassian lead to different models built from GLM?