Analyzing patterns