How Much of a Plot Can I Take?

Dear Rich: Even after intensive legal research (i.e., an afternoon with Google), I'm still confused about the applicability of copyright protection to plots. If I stay away from specific language, from specific characters and locations, how closely can I hew to the plot of a copyrighted work? For example, say I wrote a novel about a little orphan girl who discovered she was actually a sorcerer? That much is okay, I'm sure. Then what if she attended a special sorcerer school? What if she traveled to the school via a magic airplane at a hidden gate at the airport? What if she learned that her parents were killed by an Evil Wizard who was threatening to return? What if she played a magical sport for school, and was assigned into a dorm via the Picking Stocking, and befriended a gruff janitor? At what point, despite the fact that none of the words were identical, would immoral plagiarism of plot become illegal copyright infringement? The Dear Rich Staff must preface this answer by disclaiming any knowledge of books about sorcerers and wizards so if you just provided the plot of a famous book as an example, we wouldn't have any idea. (And what's a "Picking Stocking?" Is that similar to Pippi Longstocking? Please don't rip off Pippi!)
The Standard of Review. As for your question, the standard of review is best described by Judge Learned Hand in Nichols v. Universal Pictures in which the author of the popular play, Abie's Irish Rose, sued the producers of a movie, The Cohens and the Kellys. Both plots involved children of Irish and Jewish families who marry secretly because their parents are prejudiced. At the end of each work there is a reconciliation of the families, based upon the presence of a grandchild. Beyond that, the works had little in common except for ethnic clichés. 
The Abstractions Test. Judge Hand established a standard to separate the idea from the expression. He used the term "abstraction," which is a process of removing or separating something. He stated: "Upon any work, and especially upon a play, a great number of patterns of increasing generality will fit equally well, as more and more of the incident is left out." In other words, every narrative work is built around an underlying idea, in this case the basic plot summary. The idea may be similar to other plots (BTW, many people believe there are only between seven and 30 basic plots), but the author's embellishments -- the series of details and incidents that separate the idea from similar plots -- trigger copyright protection. Copyright only extends to each author's unique expression, not the underlying idea. 
Still in Use. Judge Hand's abstractions test is still applied for plots (and was even modified for application in software infringements). In Litchfield v. Spielberg a writer sued the makers of the movie E.T. -- The Extra Terrestrial. The writer claimed that the film infringed her musical play, Lokey From Maldemar, a social satire designed to "illustrate the disunity of man, divided by egotism." The district court applied the abstractions test and determined that the only similarity in both works was the basic plot line -- aliens with powers of levitation are stranded on earth, pursued by authoritarian characters and finally bid their earthly friends farewell. Again, these similarities (sometimes known as nonliteral similarities) are ideas and are generally not protectable. 
Our Takeaway Points ... Nobody but a judge or arbitrator can safely tell you whether you've taken the "expression" of a plot  or the "idea" of a plot, but you will likely run into problem if you have a high profile work and you're slavishly copying the plot (and/or  characters) of a well known work. For example, that's what happened in the copyright battle between Star Wars and Battlestar Galactica (Chaim Green R.I.P.).