1. A data generating apparatus, comprising: a plurality of detection elements configured to detect an acoustic wave propagating from a subject and output a plurality of detection signals; and a determination unit configured to determine a first propagation velocity of the acoustic wave, wherein said determination unit is configured to set a target position, using data generated based on a second propagation velocity and the plurality of detection signals, set a third propagation velocity, determine a plurality of signals corresponding to the target position, out of the plurality of detection signals based on respective distances from said detection elements to the target position and the third propagation velocity, and determine the first propagation velocity based on the plurality of signals corresponding to the target position.