Inference for Functional Data with Applications