alpha value is 0.05 if it is not specified in the problem.
**Everything should be in r code base.
4. Back to the iris dataset one last time! We wish to estimatethe probability of a flower’s species based on the availablemeasurements.
a. Build a Multinomial model to predict Species based onSepal.Length. Use it to estimate the probability of each speciesfor a flower with a sepal 6.3 cm long.
b. Build a Multinomial model to predict Species based onPetal.Length. Use it to estimate the probability of each speciesfor a flower with a petal 5.1 cm long.
c. Compare both the residual deviances and the AICs for the twoprevious models. Which appears to be the “better” model based onthese metrics?
d. Build a Multinomial model to predict Species based on allfour of the measurements (no interactions). Use the model toestimate the probability of each species for a flower with aSepal.Length of 6.3 cm, a Sepal.Width of 2.8 cm, a Petal.Length of5.1 cm, and a Petal.Width of 1.5 cm.
e. The flower described in part d is actually in the dataset.What species was it?