The student pilot’s improper in-flight fuel management when he did not switch to the fullest fuel tank when the engine began to lose power, which resulted in fuel starvation and the complete loss of engine power during maneuvering flight. Contributing to the accident was the pilot's lack of knowledge of the engine's fuel consumption rate and the inaccurate fuel flow calculations that led to an inaccurate fuel quantity prior to takeoff.