An automatic performance apparatus which automatically performs a performance pattern in which sound generation timings of notes to be sounded are set, the automatic performance apparatus comprising: a sound generation probability pattern acquisition part (S4, S9, S10) which acquires a sound generation probability pattern in which a probability of sounding a note is set for each sound generation timing of the performance pattern; an automatic performance part (S1 1, S12) which performs an automatic performance by determining whether to sound the note for each sound generation timing of the performance pattern based on the probability of each sound generation timing set in the sound generation probability pattern acquired by the sound generation probability pattern acquisition part (S4, S9, S10); an input part which inputs performance information; and a probability acquisition part which acquires a maximum-likelihood-estimated probability based on the performance information inputted to the input part, wherein the sound generation probability pattern acquisition part (S4, S9, S10) acquires a sound generation probability pattern in which the probability acquired by the probability acquisition part is set as the probability of sounding the note at each sound generation timing of the performance pattern, characterized in that further comprising: an input pattern storage part which stores a plurality of input patterns; and an input pattern selection part which selects a maximum-likelihood-estimated input pattern from among the plurality of input patterns stored in the input pattern storage part based on the performance information inputted by the input part, wherein the probability acquisition part acquires a probability corresponding to the input pattern selected by the input pattern selection part. a sound generation probability pattern acquisition part (S4, S9, S10) which acquires a sound generation probability pattern in which a probability of sounding a note is set for each sound generation timing of the performance pattern; an automatic performance part (S1 1, S12) which performs an automatic performance by determining whether to sound the note for each sound generation timing of the performance pattern based on the probability of each sound generation timing set in the sound generation probability pattern acquired by the sound generation probability pattern acquisition part (S4, S9, S10); an input part which inputs performance information; and a probability acquisition part which acquires a maximum-likelihood-estimated probability based on the performance information inputted to the input part, wherein the sound generation probability pattern acquisition part (S4, S9, S10) acquires a sound generation probability pattern in which the probability acquired by the probability acquisition part is set as the probability of sounding the note at each sound generation timing of the performance pattern, characterized in that further comprising: an input pattern storage part which stores a plurality of input patterns; and an input pattern selection part which selects a maximum-likelihood-estimated input pattern from among the plurality of input patterns stored in the input pattern storage part based on the performance information inputted by the input part, wherein the probability acquisition part acquires a probability corresponding to the input pattern selected by the input pattern selection part. an input pattern storage part which stores a plurality of input patterns; and an input pattern selection part which selects a maximum-likelihood-estimated input pattern from among the plurality of input patterns stored in the input pattern storage part based on the performance information inputted by the input part, wherein the probability acquisition part acquires a probability corresponding to the input pattern selected by the input pattern selection part.