The prices of the stock of companies vary based on many factors. Some of these are dependent on the performance of companies, future growth prospects, expectations of how the state of the economy would be, both where the company is located as well as globally, etc.; these are referred to as the fundamentals of the company and are usually used by investors that intend to hold the stock of the company for a long time and not buy and sell at short durations.
But the price of the stock of companies is not dependent only on their fundamentals, there are a lot of other factors that determine this that are classified as "technicals." Technical analysis to predict the future prices of stock based on the pattern of their price and volume transacted in the past is widely used by traders and forms a large percentage of transactions in the stock market. The psychology of people dealing in stocks plays a large role here, and many techniques have been developed over the years to predict future price movement based solely on the stock price of the company and which has nothing to do with the fundamentals of the company. For example when traders see the price of stocks rising or falling they expect them to continue to do so till levels known as resistances and supports. Traders continue to buy stocks even when they are trading at a very high price as they expect the price to rise further.
This makes it very difficult to say anything about the price of the stock of companies with the same risk profile. While there are many investors in the stock market that buy and sell stocks based on the fundamentals of companies the number of people that buy and sell stocks based merely on technical analysis is many times larger.