Friction stir welded joints often contain voids that are detrimental to their mechanical properties. Here we investigate the conditions for void formation using a decision tree and a Bayesian neural network. Three types of input data sets including unprocessed welding parameters and computed variables using an analytical and a numerical model of friction stir welding were examined. One hundred and eight sets of independent experimental data on void formation for the friction stir welding of three aluminum alloys, AA2024, AA2219, and AA6061, were analyzed. The neural network-based analysis with welding parameters, specimen and tool geometries, and material properties as input predicted void formation with 83.3% accuracy. When the potential causative variables, i.e., temperature, strain rate, torque, and maximum shear stress on the tool pin were computed from an approximate analytical model of friction stir welding, 90 and 93.3% accuracies of prediction were obtained using the decision tree and the neural network, respectively. When the same causative variables were computed from a rigorous numerical model, both the neural network and the decision tree predicted void formation with 96.6% accuracy. Among these four causative variables, the temperature and maximum shear stress showed the maximum influence on void formation.