Response families and link scales. Derive, calculate and qualify a fitted response model.
Loading your saved responses…
Try
Three synthetic groups each contain four attempts. At predictor x=−1, 0, 1, the numbers of successes are 1, 2, 3. A response model should respect that a success count cannot be negative or exceed four. Predicting it with an unrestricted straight line does not build those constraints into the model.
The grouped-binomial model says Sᵢ has distribution Binomial(nᵢ,pᵢ), conditional on its predictors. Here nᵢ=4, and pᵢ is the success probability of each attempt in group i. The binomial law assumes independent attempts with the same probability within a group; the likelihood below also assumes independent groups. These deliberately constructed numbers do not verify those assumptions.
x
Successes / trials
Proposed p
Odds p/(1−p)
Log odds η
Expected successes 4p
−1
1 / 4
1/4
1/3
−log 3
1
0
2 / 4
1/2
1
0
2
1
3 / 4
3/4
3
log 3
3
Cover the last three columns. Compute them before checking the table. The log odds form a straight line in x even though probability is a curved function of x. Throughout these lessons, log is the natural logarithm.
Predict
A link transforms a conditional mean parameter to the scale on which we specify an additive equation. For the binomial probability the logit link is η=log[p/(1−p)], with inverse p=1/(1+exp(−η)). Our design row is aᵢ=(1,xᵢ); the initial 1 supplies an intercept. With β=(β₀,β₁), ηᵢ=aᵢᵀβ. The table proposes β=(0,log 3).
Predict the probability at x=2. Is it twice the probability at x=1? Explain your answer using odds first. Then decide whether the observed fraction Sᵢ/nᵢ is the same object as the modeled probability pᵢ. A fraction is a sample result; pᵢ is a conditional parameter.
Check the response-scale prediction
At x=2, odds are exp(2 log 3)=9, so p=9/10. Moving x by one multiplies odds by 3. It does not multiply probabilities by 3 or add a fixed probability increment. The model also assumes that this equation is appropriate at the new input; the table alone cannot establish extrapolation validity.
Experiment
Live experiment: fit a response model
Predict the direction of the first coefficient update. Initialize at zero coefficients, inspect one step, then run the bounded fit. These are public synthetic data. This temporary experiment does not save work or award mastery; record your evidence in the lesson response.
Use 1–3 predictors; the intercept is automatic. Binomial rows end with successes and positive integer trials. Poisson rows end with count and fixed positive exposure; log exposure is an offset, not a fitted coefficient. Use more rows than coefficients, at most 100 rows. Counts and trials are at most 10,000; predictor magnitude at most 1,000,000; exposure 0.000001–1,000,000.
Choose Worked binomial data. In Data rows: predictors, then response count, then trials or exposure, each row has x, successes, trials. Do not enter the intercept yourself. Initialize model prepares the fit; Take one Newton step advances it manually, and Run bounded fit requests a bounded run. Nothing about loading data verifies the model assumptions. Record the initial and accepted coefficients, fitted counts, score and information. The next lesson derives these intermediate quantities.
Use GLM response family and Worked Poisson data to compare a different response mechanism. A Poisson response is a nonnegative integer count without a specified maximum number of attempts. Its mean μ equals its variance under the model. If exposure e is positive, a rate equation uses η=log μ=log e+aᵀβ. The term log e is an offset, a known contribution with coefficient fixed at 1. Predictors describe the rate; exposure converts rate to expected count.
The Poisson example uses x=−1,0,1, exposures 2,1,2 and counts 2,2,8. Its exact fit is β=(log 2,log 2), producing rates 1,2,4 and means 2,2,8. Check that a count mean and a rate have different units. A mean of 2 does not force the next count to equal 2.
The workbench accepts bounded tables with an automatic intercept and one to three predictors. Its iteration, predictor-range and arithmetic guards are numerical limits, not the mathematical domains of a GLM. It reports existence evidence separately from its stopping status. Cancel fitting stops further work; Reset GLM experiment returns the temporary experiment to its starting state. Keep your own calculation record: using the controls does not award independent statistical proficiency.
Understand
The response family supplies the likelihood
For one binomial row, the probability of s successes is C(n,s)pˢ(1−p)ⁿ⁻ˢ. Substituting the inverse logit gives the log likelihood, apart from a constant independent of β,
ℓᵢ = sᵢηᵢ − nᵢ log(1+exp ηᵢ).
For a Poisson row the probability of y is exp(−μ)μʸ/y!, so its corresponding term is
ℓᵢ = yᵢηᵢ − exp ηᵢ.
The constants may be omitted when comparing coefficients on the same data and family. Do not compare differently omitted constants across unrelated datasets and call the difference a model-selection result. Stable numerical evaluation also matters: directly forming a huge exponential is not a sound implementation of a log likelihood.
Differentiation with respect to η gives observed minus expected count. The negative second derivative is the conditional count variance: np(1−p) for binomial and μ for Poisson. This is the canonical exponential-family structure studied in the exponential-family foundation. It explains both the fitting weights and why choosing a sigmoid curve alone is not a complete statistical model.
Support and design are part of the specification
Binomial totals must be positive integers and successes integers from 0 through n. Poisson counts must be nonnegative integers, and the log-exposure model requires e>0. Zero count at positive exposure is valid. Zero exposure is a structural boundary: log e is undefined, and a positive count there contradicts this exposure model. Do not replace an invalid value with a convenient small positive number without changing and defending the data model.
Different trial probabilities within an aggregate group need not produce a binomial total. Dependence between repeated attempts also changes its variance. Likewise, a Poisson mean equation can be reasonable while the Poisson variance assumption fails. Family choice, link choice, design rank and collection assumptions are separate decisions.
Apply
A count model uses a rate of 3 per hour at x=0 and a slope log 2. Find its expected count at x=1 over half an hour. A separate logit model has probability 1/3 at x=0 and the same slope log 2. Find its probability at x=1. Explain why the same coefficient has different response-scale meanings.
Check the rate and odds separately
The count rate doubles to 6 per hour, so the half-hour mean is 3. The initial binomial odds are (1/3)/(2/3)=1/2; doubling them gives odds 1 and probability 1/2. The shared slope multiplies rates in one model and odds in the other. It does not double the second probability to 2/3.
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
Three independent groups have totals (6,6,6), successes (2,3,4), and predictor x=(−1,0,1). Compare an intercept-only binomial model with a logit model having intercept 0 and slope log 2. Calculate fitted success counts and identify the independence assumption hidden by aggregation.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Independent Poisson counts at exposures (1,2,4) are (1,3,3). Fit a constant rate by maximum likelihood. Derive the score and estimate, then predict at exposure 3. Explain why regressing counts without exposure answers a different question.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A logit model has η=−log 3+(log 2)x. A Poisson rate model has log μ=log e+log 3+(log 2)x. Calculate both responses at x=0 and x=1 with exposure e=2. Interpret the shared slope and explain why it does not double a binomial probability.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A row records 8 successes out of 5 attempts; another records a Poisson count −2 at exposure 4; a third records count 3 at exposure 0. Decide which ordinary models are valid. Contrast a zero count at positive exposure with zero exposure.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Starting from log likelihood sη−n log(1+exp η) for a grouped binomial row and yη−exp η for a Poisson row, derive the first two derivatives and connect them to conditional means and variances. Constants independent of η may be omitted.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Two sets of independent Bernoulli trials have success probabilities 1/4 and 3/4, two trials in each set. Can their total always be modeled as Binomial(4,1/2)? Compare its variance and probability of zero with that binomial model.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.