Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Density estimation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == [[File:P glu given diabetes.png|thumb|right|360px|Estimated density of ''p'' (glu {{pipe}} diabetes=1) (red), ''p'' (glu {{pipe}} diabetes=0) (blue), and ''p'' (glu) (black)]] [[File:P diabetes given glu.png|thumb|right|360px|Estimated probability of ''p''(diabetes=1 {{pipe}} glu)]] [[File:Glu opt.png|thumb|right|360px|Estimated probability of ''p'' (diabetes=1 {{pipe}} glu)]] We will consider records of the incidence of [[diabetes]]. The following is quoted verbatim from the [[data set]] description: :''A population of women who were at least 21 years old, of [[Pima people|Pima]] Indian heritage and living near Phoenix, Arizona, was tested for [[diabetes mellitus]] according to [[World Health Organization]] criteria. The data were collected by the US National Institute of Diabetes and Digestive and Kidney Diseases. We used the 532 complete records.<ref>{{cite web|url=https://stat.ethz.ch/R-manual/R-patched/library/MASS/html/Pima.tr.html|title=Diabetes in Pima Indian Women - R documentation}}</ref><ref>{{cite journal|author=Smith, J. W., Everhart, J. E., Dickson, W. C., Knowler, W. C. and Johannes, R. S.|year=1988|title=Using the ADAP learning algorithm to forecast the onset of diabetes mellitus|journal=Proceedings of the Symposium on Computer Applications in Medical Care (Washington, 1988)|editor=R. A. Greenes|pages=261β265|place=Los Alamitos, CA|pmc=2245318}}</ref>'' In this example, we construct three density estimates for "glu" ([[Blood plasma|plasma]] [[glucose]] concentration), one [[Conditional probability|conditional]] on the presence of diabetes, the second conditional on the absence of diabetes, and the third not conditional on diabetes. The conditional density estimates are then used to construct the probability of diabetes conditional on "glu". The "glu" data were obtained from the MASS package<ref>{{cite web|url=https://cran.r-project.org/web/packages/MASS/index.html|title=Support Functions and Datasets for Venables and Ripley's MASS}}</ref> of the [[R programming language]]. Within R, <code>?Pima.tr</code> and <code>?Pima.te</code> give a fuller account of the data. The [[mean]] of "glu" in the diabetes cases is 143.1 and the standard deviation is 31.26. The mean of "glu" in the non-diabetes cases is 110.0 and the standard deviation is 24.29. From this we see that, in this data set, diabetes cases are associated with greater levels of "glu". This will be made clearer by plots of the estimated density functions. The first figure shows density estimates of ''p''(glu | diabetes=1), ''p''(glu | diabetes=0), and ''p''(glu). The density estimates are kernel density estimates using a Gaussian kernel. That is, a Gaussian density function is placed at each data point, and the sum of the density functions is computed over the range of the data. From the density of "glu" conditional on diabetes, we can obtain the probability of diabetes conditional on "glu" via [[Bayes' rule]]. For brevity, "diabetes" is abbreviated "db." in this formula. :<math> p(\mbox{diabetes}=1|\mbox{glu}) = \frac{p(\mbox{glu}|\mbox{db.}=1)\,p(\mbox{db.}=1)}{p(\mbox{glu}|\mbox{db.}=1)\,p(\mbox{db.}=1) + p(\mbox{glu}|\mbox{db.}=0)\,p(\mbox{db.}=0)} </math> The second figure shows the estimated posterior probability ''p''(diabetes=1 | glu). From these data, it appears that an increased level of "glu" is associated with diabetes.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)