Surgical intervention for a number of conditions may remove anatomical structures necessary to erection, damage nerves, or impair blood supply. Erectile dysfunction is a common complication of treatments for prostate cancer, including prostatectomy and destruction of the prostate by external beam radiation, although the prostate gland itself is not necessary to achieve an erection. As far as inguinal hernia surgery is concerned, in most cases, and in the absence of postoperative complications, the operative repair can lead to a recovery of the sexual life of people with preoperative sexual dysfunction, while, in most cases, it does not affect people with a preoperative normal sexual life.
Both ED and low testosterone (hypogonadism) increase with age. The incidence of the latter is 40% in men aged 45 years and older.  Testosterone is known to be important in mood, cognition, vitality, bone health, and muscle and fat composition. It also plays a key role in sexual dysfunction (eg, low libido, poor erection quality, ejaculatory or orgasmic dysfunction, reduced spontaneous erections, or reduced sexual activity). 
The Cancer of the Prostate Strategic Urologic Research Endeavor (CaPSURE) study, designed to determine whether an individual man’s sexual outcomes after most common treatments for early-stage prostate cancer could be accurately predicted on the basis of baseline characteristics and treatment plans, found that 2 years after treatment, 177 (35%) of 511 men who underwent prostatectomy reported the ability to attain functional erections suitable for intercourse. 
Alprostadil self-injection. With this method, you use a fine needle to inject alprostadil (Caverject Impulse, Edex) into the base or side of your penis. In some cases, medications generally used for other conditions are used for penile injections on their own or in combination. Examples include papaverine, alprostadil and phentolamine. Often these combination medications are known as bimix (if two medications are included) or trimix (if three are included).
The physical examination can reveal clues for physical causes of erectile dysfunction. A doctor will perform an assessment of BMI and waist circumference to evaluate for abdominal obesity. A genital examination is part of the evaluation of erectile dysfunction. The examination will focus on the penis and testes. The doctor will ask you about penile curvature and will examine the penis to see if there are any plaques (hard areas) palpable. The doctor will examine the testes to make sure they are in the proper location in the scrotum and are normal in size. Small testicles, lack of facial hair, and enlarged breasts (gynecomastia) can point to hormonal problems such as hypogonadism with low testosterone levels. A health care provider may check pulses in your groin and feet to determine if there is a suggestion of hardening of the arteries that could also affect the arteries to the penis.
I would think the 25% is just an average. Some men never have a problem with erections. Some healthy men in their 60's never have a problem with their erections -- no Viagra needed at all, thank you. And, no, it is NOT completely associated with age. In fact, many men in their 40's and even younger, are already dealing with ED, especially if they smoke, are obese, don't exercise, or are addicted to porn, among other things. In fact, even men in their 20's and 30's can have these problems.
Medication therapy is extremely effective in augmenting the quality of man’s erection such that he is able to have satisfactory intercourse. Indeed medications referred to as phospho-diesterase inhibitors such as Cialis, Viagra, Levitra and Stendra work in 65% of men suffering from erectile dysfunction. Cialis is currently the preferred drug since it is the only one that may be taking on a full stomach and lasts for 36 hours. This favors a more romantic and natural sexual interaction. Planning kills the mood!
Inflatable prostheses are complex mechanical devices that imitate the natural process of erection. Parts are inserted surgically into the penis and scrotum, and activated by squeezing. When erection is no longer desired, a valve on the pump is pressed, and the penis becomes flaccid. Self-contained single-unit prostheses are similar to the inflatable types, but more compact. The entire device is implanted into the penis. When erection is desired, the unit is activated by either squeezing or bending, depending on which of the two types of self-contained prostheses is used.
As with most other organ system in the human body, changes and loss of function is normal consequence of the ageing process. This is also true of the endocrine system, specifically the levels of testosterone production from the Leydig cells of the testicle. Accompanying the decrease in testosterone is a decrease in erections which also has a component in decrease in the blood supply to the penis making erection not as frequent and not as rigid compared with a young man’s erectile function. Although these changes are in itself not life threatening, they can impact a man’s relationship with his partner, and also ED may be a harbinger of other undiagnosed conditions such as coronary artery disease (CAD), hypercholesterolaemia or diabetes mellitus.6
ICI Alprostadil may be used as a mixture with two other drugs to treat ED. This combination therapy called "bimix or trimix" is stronger than alprostadil alone and has become standard treatment for ED. Only the Alprostadil ingredient is FDA approved for ED. The amount of each drug used can be changed based on the severity of your ED, by an experienced health professional. You will be trained by your health professional on how to inject, how much to inject and how to safely raise the drug's dosage if necessary.