Answer
To test, you could decorate non-stinging insects in the same black-and-yellow patterns and see if they are avoided as well. To see if avoidance is learned, test various modes of learning (allow a young animal to be exposed with an older one already avoiding these color patterns; use young animals alone to look for innate avoidance; etc.). You could measure the significance by covering the color pattern in one population of stinging insects and not in another and then follow survival when exposed to animals which have learned to avoid these insects.
Work Step by Step
Here, you need to see that the key to testing whether avoidance is learned or not is to use both inexperienced and experienced animals, and that to test factors about the color patterns, you can modify them on the stinging insects or you can add them to harmless insects.