Life can be viewed as an experiment, but not as we typically think of experiments. Before one can understand why though a few other things must be explained.
Firstly it must be understood that the state of consciousness we experience is not what we think it is. We function primarily within the confines of an illusion of linear time and space. Time and space shouldn't be viewed as seperate "dimensions", or even a form of perception. To explain this it must be understood that the root of everything is in a timelessness, a "single point being", which isn't even entirely accurate, from which we pull out events to experience. According to this idea, time is simply the prodouct of ordering events- I'm hitting these keys on my keyboard in a certain sequence to form words and sentences, so therefore it seems that I hit the "I" key before the "'" and the "m" to form the word "I'm", whereas in the larger picture of being I have not only hit them all at once, but in every other conceivable possible way and order. In this sense, there are an infinite amount of "probable realities" that have happened, will happen, are happening, or rather are constatnly "becoming", and my consciousness is the chooser of which events I will experience. In some probable reality maybe my laptop is white instead of black, maybe my name is Tom instead of Max, maybe I'm speaking in Russian, or even a language that we don't know of in this probable reality.
When this is understood, that every event conceivable and inconceivable is becoming, life can be viewed as an experiment in the sense that our "psyches" or higher consciousness- the expanded form which isn't contained by a body which forms the reality that we choose now- is choosing what to experience. Our lives therefore are experiments; what will happen if I choose to say X to a person, or Y to a person? Let's find out. In this sense we are constatnly setting up situations for ourselves to learn from- not our egos, which is the compressed form of reality that we choose to experience moment by moment, but the psyche, the greater consciousness. I have chosen (though it was already chosen in a sense, energy simply drew me to this body, which is really coming into existence and being moment by indivisible, infinite moment) to be incarnated as a male who stands roughly six feet tall with soft, thick brown hair, brown eyes, the son of a very loving and compassionate mother, who's father would die in 2003, who lives in a "middle income" house on Long Island in one of the world's most poweful and influential countries, the United States- all for a reason. My "soul", which isn't anything seperate at all but is the specific brand of energy that defines me and that I define the universe by, needs to be complete and this is the perfect situation for me to learn everything I need to learn.
And yet there is room for free will, as the universe and firmament is co-created. It has been scientificially proven that things come into "being" upon our perception of them. Through our intent, will, and beliefs, we choose how everything around us will manifest.
If you search, you will find the information there. Always remain skeptical, for to take something for granted is to fall under dogma.