In patients with pernicious anemia, the B vitamin that is deficient is vitamin B12. Pernicious anemia is a type of megaloblastic anemia, which is caused by the body's inability to properly absorb vitamin B12. This can be due to a lack of intrinsic factor, which is a protein that is necessary for the absorption of vitamin B12 in the gastrointestinal tract. Without enough intrinsic factor, the body cannot absorb vitamin B12 from food, leading to a deficiency of this vitamin and the development of pernicious anemia.