I married four years ago. About two years ago, my wife had a miscarriage. Since then we have had no hope. I think it's because of me. I think my penis is undersized and that is why we are not able to have children. My penis is about two and a half inches. Is it enough or not? Please answer me.
The size of a man's penis has nothing to do with whether he is able to father children or not. The penis is only the delivery vehicle and since a man is able to ejaculate with some force, even a man with a small penis is able to deliver sperm into his wife so that pregnancy can take place.
Since a child was conceived two years ago, it does mean that you two have some fertility. What you need to do is visit a doctor who can check both of you out. For your wife, the doctor will need to confirm that her hormones are in the proper balance to release eggs and that she doesn't have any scar tissue blocking the eggs from entering her uterus. For you, the doctor needs to check that you are producing enough sperm and that they are active. It is only from the position of knowing facts can you then decide what needs to be done.
In the meantime, the best way to increase your chances of conceiving a child is to have sex more often, especially toward the middle of the time between your wife's blood flows. Frequent sex will make sure that fresh, viable sperm is available to meet the egg when your wife releases one.